Showing results for 
Search instead for 
Did you mean: delete points


I am looking for a way to delete all points with a user function.  They are non associative points that are left from the Assembly Clearance program.  I have a simple ufunc that runs the assembly clearance with our preferences and I want to delete all points when it is done.  Also, I don't believe you can call a macro from a user function... is this still correct?  I have been able to have a macro call a user function but not the other way around.


Thank you,



Visual Studio 2012


Re: delete points

Gears Honored Contributor Gears Honored Contributor
Gears Honored Contributor

The journal recorder is your friend here. Start the journal recorder, delete a point, stop the recorder. The recorded code will show you the necessary functions to delete the point. Now you can modify the code to iterate through the part's .Points collection adding each to the delete list that meets your criteria.

Re: delete points

Siemens Phenom Siemens Phenom
Siemens Phenom


A couple thoughts - along the lines of what cowski said, you can get all of the points in the part with thePart.Points (PointCollection), and one version of AddToDeleteList takes an array, so you can stuff them all in there at one time and then call DoUpdate, and they will be deleted.


Another possibility:  If your points are created in a program while doing the clearance check, just set an undo mark before that process starts, and then undo to that mark after you are done, and you should be right back where you started.  (I wasn't sure if you were doing that step in a program or not.)


And you are correct that there is no supported method to launch a .macro from any of the automation toolkits.