I have some difficulties to get the name of new created object via API.
I am using VB (Visual Studio'08) and trying this code:
Dim SelMgr As Object
Dim selObj As Object
Dim myname As String
SelMgr = swDoc.SelectionManager()
swDoc.SketchManager.CreateCenterLine(0.02, 0, 0, 0.02, 0.02, 0)
selObj = SelMgr.GetSelectedObject5(1)
swDoc.SketchManager.CreateCenterLine(0.02, 0, 0, 0.02, 0.02, 0)
selObj = SelMgr.GetSelectedObject5(1)
myname = swDoc.GetEntityName(selObj)
and having empty string. When in debugging mode I am checking object "selObj" I can not see something like "name" property.
Can you please teach me how to fix that?
Regards
Simon
SolidworksApi macros