API: How to get the parent component of a selected assembly component (VBA, VB.NET, C#)

File uploaded by Joyce Bossom Employee on Dec 13, 2010Last modified by Joyce Bossom Employee on Nov 2, 2012
Version 4Show Document
  • View in full screen mode

This example shows how to get the parent component of a selected assembly component.

 

  1. Download and extract the archive in a convenient location.
  2. Open an assembly in SolidWorks.
  3. Select a child component in the assembly view.
  4. Open an Immediate window.
  5. Run the macro (VBA, VB.NET, or C#) in the Macro Editor.

 

The Immediate window displays the names of the selected child component and its parent.

 

Note:
- Subscription Services required for full access.

- Looking for more API Examples?

 

Copyright © 2011 Dassault Systèmes SolidWorks Corp. All rights reserved.
Do not distribute or reproduce without the written consent of Dassault Systèmes SolidWorks Corp.

Attachments

Outcomes