- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Export all vertices from Part Document without selection
Hello everyone!
Please Help!
I have a Part Document that's a result of a subtraction (with kDerivedSubtractAll) in a DerivedAssemblyDefinition.
I want to export the coordinates of the vertices/points included in the Part geometry to an Excel File without selecting them. So, I need either an automatic selection of all part-vertices and then export of their coordinates or an automatic recognition of the part's vertices created as a result of the Subtraction.
I have been trying to use the "workpoints" with DocDef.workpoints so to have all points of part as an output but all I get exported to the Excel Document is just one point with zero values (probably the ucs-origin) so I assume that the workpoints do not represent all points/vertices in an activedocument.
Do you have any suggestions???
Thanks in advance!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
How are the points you are trying to export being created. Do you simply mean the end points of the edges of the parts (vertices) or are there actual points/workpoints in the model.
If your just trying to get all the part edges end points you'll need to do something like. (I didn't test the following just kind of generated it on the fly)
For i = 1 to oPartDef.SurfaceBodies.Count
For j = 1 to oPartDef.SurfaceBodies.Item(i).Edges.Count
oStartPoint = oPartDef.SurfaceBodies.Item(i).Edges.Item(j).StartVertex.Point
oStopPoint = oPartDef.SurfaceBodies.Item(i).Edges.Item(j).StopVertex.Point
'DO SOMETHING WITH THE POINTS HERE
'.... Exporting Points.....
Next
Next
We'll need a little more information, I believe, to help you along here if this isn't what you are trying to do.
An image of your model with the points your working with might be helpful if its not easily explained.
Best of Luck
---------------------------------------------------------------------------------------------------------------------------------
If you find this reply helpful or insightful, please use the 'Accept as Solution' or 'Kudos' button below.