AnsweredAssumed Answered

Document Manager API vs Solidworks API

Question asked by Mike Ferrughelli on Jul 30, 2015
Latest reply on Jul 30, 2015 by Luis Lazo

Hello

I am trying to better understand the proper usage of the Document Manager API vs. the Solidworks API

 

In direct regards to this example: 2014 SOLIDWORKS API Help - Traverse Assembly at Component and Feature Levels Using Recursion Example (VB.NET)

 

In the above example, this work is done inside Solidworks where the macro already knows what document its working with via:

 

My question would be this: 

 

1) Is it possible to leverage the Document Manager API to feed the Solidworks API information regarding which document I'm working on? Examples of properties used by the Solidworks API that I'd like:

.GetFirstSubFeature

.NextSubFeature

.GetChildren

etc..

(Looking to build a BOM when one doesn't exist in Solidworks by looking at FeatureManager tree via Top Assembly > Sub Assemblies > Children of those Sub Assemblies)

 

2) Are all the properties above ONLY accessible via a Macro inside Solidworks?

 

I need to work outside of Solidworks and it seems that I'm really strapped to what the DM API can return for me.

 

Any insight appreciated, this forum has been a big help in even getting this far..

Outcomes