AnsweredAssumed Answered

How Get ID of a Offset Entity

Question asked by roberto gennari on Aug 19, 2014




I have a problem with the new segment created with SketchOffsetEntities2, becouse after the creation, The segment is automatically deselection.

To obtain the ID of the new segment I thought of scanning all the entities of the sketch and get the latest entity, but it is the correct way?


This is my simple code:


           For i = 1 To 1
                swSelObj = swSelMgr.GetSelectedObject3(i)

                'if it is an edge
                If swSelMgr.GetSelectedObjectType2(i) = 1 Then
                    swSelMgr = MyModDoc.SelectionManager
                    boolstatus = MyModDoc.SketchOffsetEntities2(-0.01, False, False)
'now I want to select the segment you just created and get the ID for future selections