It works only when interactive.
I think problem is in zeros from selectbyID2.
They aren't used to select specific part, because it is selected by name, but I think it puts 0 values in X Y and Z variables.
Maybe there is another command to select without those parameters?
I have made it through to macro like this :
Dim swApp As SldWorks.SldWorks
Dim Part As ModelDoc2
Dim SelMgr As SldWorks.SelectionMgr
Sub main()
Dim point As Variant
Set swApp = Application.SldWorks
Set Part = swApp.ActiveDoc
boolstatus = Part.Extension.SelectByID2("Point7@Szkic 3D10"...
Sorry for rush.
I solved right point selection by drawing it and selecting by Part.Extension.SelectByID2("Point@3D sketch", "EXTSKETCHPOINT", 0, 0, 0, False, 0, Nothing, 0)
Works fine, but with this selection example of getting coordinates from API help doesn't seem to work.
With
Dim...
Maybe it will be better to draw a point at the end of the arm and get coordinates of this point ?
I tried to select such point but with no result. Only could select sketch on which it was drawn.
Hello,
I am new in SolidWorks API.
I don't know how through VBA choose specific point on assembly ( in this case it is end of robotic arm ).
And check its coordinates which will be used later.
Could someone give me a working example which I could analize ?
Thank you in advance.
P.S. This is...