You need to be logged in to view this content. Please login or become a member.

<<  Prev   |   Index   |   Next  >>


This lesson covers the skills that separate the men from the boys. If you want to take your understanding of API to the next level, you MUST understand the SolidWorks BREP (boundary representation) model, most notably the difference between geometry and topology objects and their key uses.


There are no additional notes for this lesson. If you think I missed something, didn’t explain something clearly, or made a mistake, please leave a comment at the bottom.

Lesson Files

Lesson 4.3 find largest face code
Lesson 4.3 selected edge length code
Code snippets

One Comment

  1. Question I received from a member:
    “I am trying to develop a macro that assigns a value to a custom property… I need to look at the part in the front view, and assign the height, width and depth of the part to the custom properties. It doesn’t have to be exact, I just basically need to know the approx overall dims of the part- so that I can estimate the shelf bin size for it. Any thoughts on this?”

    “If approximation is good enough then IPartDoc::GetPartBox will return the bounding box data. Specifically it returns an “array of 6 doubles containing the 2 diagonal pts that bound the part”. The first three being the XYZ coords of the first pt and the second three being the XYZ coords of the second pt. There’s an example in the API Help that might be useful.”

Questions and Comments

You must be logged in to post a comment.