×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

API Call to Determine If a Part is From the Toolbox

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

RE: API Call to Determine If a Part is From the Toolbox

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

RE: API Call to Determine If a Part is From the Toolbox

(OP)
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

RE: API Call to Determine If a Part is From the Toolbox

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

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources