Is there a way to interrogate the Assembly child parts and sub-assemblies without opening the file?

by MLombard on ‎04-13-2016 04:09 PM (825 Views)

Question

I am checking if there is somthing in the programming libraries that allows me to gather the child part or sub-assembly file names and their paths without opening the assembly using the Solid Edge api.

 

I see that I can gather file properties but not the list of occurrences.

 

Thanks,

 

Bob

Sorry, I am looking to do this via code not manual means.

 

I do see where I can use an open on the revision manager api application object but I can't seem to locate how I can set a document to that as I am getting COM errors if I do that.

 

Any suggestions woule be gratly appreciated.

 

Thanks,

 

Bob

Answer

I believe you would have to use the RevisionManager API

In Revision Manager, if you right click on a part you can select Show Parents and it will list all the occurrences.  In case you've never used RM before it is located in the View and Markup program and then under the drop down OPEN folder part.  I had no idea where it was until someone pointed it out.

Dim objRevMan As RevisionManager.Application

Dim objDoc As RevisionManager.Document

 

Set objRevMan = CreateObject("RevisionManager.Application")

Set objDoc = objRevMan.Open (filename)

Comments
by Esteemed Contributor
‎07-21-2016 09:45 AM - edited ‎07-21-2016 09:51 AM

There s also a downloadble SDK package that has some advanced stuff including some DLL "readers" that do not require Solid Edge to be installed.

 

The one for assemblies is "SEreader.DLL".  The documentation is almost non-existant (call GTC and they can forward you some decent stuff).  The following is the documentation in the SDK for it:

 

User’s Guide to the SEReader API

This dll enables access to a SE asm files without the requirement for having Solid Edge loaded on the local system.

 

Run regsvr32 on the SEReader.dll and look at the objects and interfaces in the typelib (the lib is in the dll). The top level object allows you to open one asm file at a time, get the attachments object and then enumerate each part occurrence. The occurrence object returns three pieces of information, the matrix, the range and the filename. You can use the name to keep track of the count.

 

Here is a slideshow on lightweight API's:  http://www.slideshare.net/SiemensPLM/solid-edge-api-lightweight-apis