I am researching the Solid Edge API and have a few questions.
1 - Is it possible to use the API to access an existing solid edge document, and grab/output the list of components?
2 - Is it possible to use the API to access an existing solid edge document, and export a particular part as identified in the parts list?
If you could also breifly outline, or direct me to a document that can outline how this can be done, that would be much appreciated!
Posted by: Michael BaylisPost date: 12/6/2011 3:50:48 PM
You can do this in 2 ways. Opening the file and requesting the Occurrences collection.
Or via Revision Manager, you have a good example in \Custom\RevManager
Export? What do you mean? Anyway the only way to access the part using the name shown in the pathfinder is with a function like this (for 1st level part)
dim oSE as SolidedgeFramework.Application = getobject(,"solidedge.application")
dim objAsm as SolidedgeAssembly.AssemblyDocument = oSE.ActiveDocument
From the Occurrence you can access the Document Object and whatever is inside. (Occurrence.OccurrenceDocument)
function searchOccByName(objAsm as SolidedgeAssembly.AssemblyDocument, theName as string) as SolidEdgeAssembly.Occurrence
for each occ as SolidedgeAssembly.Occurrence in objAsm.Occurrences
if occ.name=theName then
Posted by: Julian GuilloPost date: 12/7/2011 1:30:20 AM