Passing selection to Civil3d command

Passing selection to Civil3d command

Anonymous
Not applicable
967 Views
0 Replies
Message 1 of 1

Passing selection to Civil3d command

Anonymous
Not applicable

Dear all,

 

I am trying to call a Civil 3D command from VBA including a previously made selection of a polyline. I have found a snipped calling the polyline, but do not get around passing it to the Civil command. The command line works as follows

 

(command "._createptstationoffsetobj" pause "._line" "0" "0" "-9" "None" "-1.2")

 

From VBA I have a snipped saying

 

Sub importPoints()
'    ThisDrawing.SendCommand "_Circle" & vbCr & "2,2,0" & vbCr & "4" & vbCr
    Dim ss As AcadSelectionSet, i As Long
    
    On Error Resume Next
    Set ss = ThisDrawing.SelectionSets("ss")
    If Err Then Set ss = ThisDrawing.SelectionSets.Add("ss")
    ss.Clear
    ss.SelectOnScreen
    
    Call ThisDrawing.SetVariable("FILEDIA", 0)
    ThisDrawing.SendCommand "._createptstationoffsetobj " & ss.Item(i).Handle & vbCr
    Call ThisDrawing.SetVariable("FILEDIA", 1)

End Sub

 

Any hints are highly welcome on how to correctly define the line

 

ThisDrawing.SendCommand "._createptstationoffsetobj " & ss.Item(i).Handle & vbCr

Best regards

 

Sebastian

0 Likes
968 Views
0 Replies
Replies (0)