Hide Table of Contents
Getting Started

Glossary Item Box

Writing a SOLIDWORKS Costing API application typically involves:

  1. Adding a reference to either the SOLIDWORKS Costing API type library or primary interop assembly:
    • VBA: SldCostingAPI version Type Library or install_dir\sldcostingapi.tlb.
    • C# or VB.NET: SolidWorks.Interop.sldcostingapi or install_dir\api\redist\SolidWorks.Interop.sldcostingapi.dll.

      NOTE: install_dir is usually C:\Program Files\SOLIDWORKS Corp\SOLIDWORKS.
  2. Opening the part for the Costing analysis.
  3. Getting or setting the Costing template folders and Costing Report template folders using ISldWorks::GetUserPreferenceStringValue or ISldWorks::SetUserPreferenceStringValue (see Templates).
  4. Getting the model document, IModelDoc2 object.
  5. Getting the CostingManager, ICostManager object, and getting the Costing templates.
  6. Getting the Costing model, ICostPart object.
  7. Getting the Costing bodies, ICostBody objects.
  8. Creating or getting the common Costing analysis, ICostAnalysis object, and getting and setting its analysis data.
  9. Creating or getting each Costing body's specific Costing analysis. 
  10. Getting each Costing feature or subfeature, ICostFeature object, and getting or setting its analysis data.

Templates

The SOLIDWORKS Costing tool provides templates that associate manufacturing features with their costs. The templates include information about material, machining, and labor costs. After the manufacturing features are recognized, Costing categorizes each manufacturing feature and applies the correct information from the template to cost out the specific manufacturing features. A total cost for all of the features is tabulated and a final unit cost is returned. You can also create reports of Costing results using the SOLIDWORKS Costing tool. The detailed line items in the report help you determine the impact of design decisions on cost.

To get or set the file locations for Costing templates and Costing report templates, you can use the SOLIDWORKS API and call ISldWorks::GetUserPreferenceStringValue or ISldWorks::SetUserPreferenceStringValue with:

For more information about SOLIDWORKS Costing and its templates, see the SOLIDWORKS Help.



Provide feedback on this topic

SOLIDWORKS welcomes your feedback concerning the presentation, accuracy, and thoroughness of the documentation. Use the form below to send your comments and suggestions about this topic directly to our documentation team. The documentation team cannot answer technical support questions. Click here for information about technical support.

* Required

 
*Email:  
Subject:   Feedback on Help Topics
Page:   Getting Started
*Comment:  
*   I acknowledge I have read and I hereby accept the privacy policy under which my Personal Data will be used by Dassault Systèmes

Print Topic

Select the scope of content to print:




x

We have detected you are using a browser version older than Internet Explorer 7. For optimized display, we suggest upgrading your browser to Internet Explorer 7 or newer.

 Never show this message again
x

Web Help Content Version: API Help (English only) 2024 SP04

To disable Web help from within SOLIDWORKS and use local help instead, click Help > Use SOLIDWORKS Web Help.

To report problems encountered with the Web help interface and search, contact your local support representative. To provide feedback on individual help topics, use the “Feedback on this topic” link on the individual topic page.