Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Identify/Count the Objects/Entities Drawn in Drawing Template SW2001+

Status
Not open for further replies.

imlabs

Computer
Aug 8, 2002
5
Currently i am using Solidworks 2001 Plus.

I would like to know whether it is possible to identify/count all the objects/entites as well as obtain their individual properties that are present in a drawing template using Visual Basic Code (without selecting the objects/entities).

If so what functions needs to be used ? It would be of great help, if a code snippet as an instance can be given
 
Replies continue below

Recommended for you

Yes, this is possible, but will take some time to write. I don't think that you will get a complete answer to this question because it has a rather large solution.

In short, you will use ModelDoc.GetFirstView to obtain the drawing template. Once you have the Drawing View object, you can use all of the Get... methods to obtain each drawing object. Once you have those objects, you can obtain the information for each object.

Take a look at the SolidWorks API Help from the SW Help Menu. Use the SolidWorks Objects section to see what objects, methods and properties are available. There is sample code, although sometimes lacking, that can get you started. If you have a specific question regarding obtaining a particular object or property, let us know.

Good luck... DimensionalSolutions@Core.com
While I welcome e-mail messages, please post all thread activity in these forums for the benefit of all members.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor