API Call to Determine If a Part is From the Toolbox
API Call to Determine If a Part is From the Toolbox
(OP)
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
Eric






RE: API Call to Determine If a Part is From the Toolbox
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
RE: API Call to Determine If a Part is From the Toolbox
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
RE: API Call to Determine If a Part is From the Toolbox
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