hi,
i used the above code to get coordinates of objects in a sketch. but when i run the code it is throwing an error “Object doesn’t support this property or method (Error 438)”. Please Help me to overcome this.
Hello Keith,
First time ever using macros in solidworks. I am trying to use your “get the coordinates of all sketch points in drawing views.” I select the drawing view, run the macro… where are the coordinates saved?
They are printed to the immediate window aka the debug window. To see the immediate window, do the following:
1. In SolidWorks, go to Tools–>Macro–Edit
2. Open the .swp file
3. Run the macro from within the VB Editor using the green run button
4. Hit Ctrl+G and this will bring up the immediate window, or go to View–>Immediate Window
Ready to start learning the SolidWorks API? Sign up for FREE membership here.Keep up with new videos, macros, and training events by joining our mailing list:
hi,
i used the above code to get coordinates of objects in a sketch. but when i run the code it is throwing an error “Object doesn’t support this property or method (Error 438)”. Please Help me to overcome this.
Hi, please use this guide to help you resolve your issue. Error 438 is covered.
Hello Keith,
First time ever using macros in solidworks. I am trying to use your “get the coordinates of all sketch points in drawing views.” I select the drawing view, run the macro… where are the coordinates saved?
thanks a lot. great work.
They are printed to the immediate window aka the debug window. To see the immediate window, do the following:
1. In SolidWorks, go to Tools–>Macro–Edit
2. Open the .swp file
3. Run the macro from within the VB Editor using the green run button
4. Hit Ctrl+G and this will bring up the immediate window, or go to View–>Immediate Window
The points should be printed there.
Hi, I use the code above, but dont found any point at all.
swSketch.GetSketchPointsCount2() = null
Do you have the drawing view selected before you run the macro?