API: How to access information about a hole generated by the Hole Wizard (VBA, VB.NET, C#)

Version 3

    This example shows how to access information about a hole that was generated by the Hole Wizard.

     

    Problem:

     

    A hole generated by the Hole Wizard contains a lot of information that can be used by other applications such as CAM and automatic ordering/inventory systems.

     

    Solution:

     

    All of the information that is available through the UI is also accessible through the API.

     

    1. Extract the archive to a convenient location.
    2. Open a part or assembly in SolidWorks
    3. Generate a new hole using the Hole Wizard, if one does not already exist.
    4. Select the hole.
    5. Run the macro (VBA, VB.NET, or C#) in the Macro Editor.
    6. Inspect the Immediate window for information about the selected hole.

     

    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.