Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

API Call to Determine If a Part is From the Toolbox

Status
Not open for further replies.

EEnd

Mechanical
Feb 6, 2004
636
I am looking for a way, using the SolidWorks API, to check the state of the flag that identifies toolbox parts. I remember a thread about this, but the closest I could find while searching was: thread559-179291. The SolidWorks Document Manager, SwDMDocument::ToolboxPart property is close, but I am looking to do it inside a SW macro, not through the Document Manager dll.

Eric
 
Replies continue below

Recommended for you

Hi Eric ;

My english is not so good and I'm not sure to understand all you want to say.

I don't understand why you don't want to use the DocumentManager API. Sure, you have a good reason, so I'd like to know it.



SW2007 SP3
Worksatation HP wx4300 2GB
NVidia Quadro FX 3450
 
Florent,

I am creating a macro that runs on the active document in SolidWorks. So I have a ModelDoc2 object that I can convert to a PartDoc. I had hoped that I could check the state using one of those two classes.

I have yet to us the SolidWorks Document Manager API, and am unfamiliar with it. I think I would have to create an instance of the Document Manager, and use that to query the document that I have open in SolidWorks. It does not seem like an elegant way of accomplishing what I want, but I will try it.

Eric
 
Ok Eric ;

I understand and you're right.

It's sure it's not very clean to do it like you said.
But it's seems the best way or rather the unique way.

I looked for a method to convert the ModelDoc2 to a SwDMDocument. But unfortunately, I didn't find it.
I'm surprised this method doesn't exist.

Florent


SW2007 SP3
Worksatation HP wx4300 2GB
NVidia Quadro FX 3450
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor