> Create Thicken Feature Example (VBA)
Welcome
Getting Started
SolidWorks API Help
FeatureWorks API Help
SolidWorks Document Manager API Help
eDrawings API Help
SolidWorks Routing API Help
SolidWorks Simulation API Help
SolidWorks Utilities API Help
SolidWorks Workgroup PDM API Help
Hide Table of Contents Show Table of Contents

Create Thicken Feature Example (VBA)

This example shows how to create a thicken feature in a multibody part.

 

'---------------------------------------------

Dim FeatureBossArray(1) As Object

 

Part.SelectById2 "Extrude1", "SOLIDBODY", 0, 0, 0, swSelectOptionDefault

Part.AndSelectById "Extrude2", "SOLIDBODY", 0, 0, 0

 

Set FeatureBossArray(0) = SelMgr.GetSelectedObject5(1)

Set FeatureBossArray(1) = SelMgr.GetSelectedObject5(2)

 

Part.ClearSelection

Part.SelectByMark "Extrude2", "BODYFEATURE", 0, 0, 0, 0

Part.AndSelectByMark "Surface-Offset2", "SURFACEBODY", -0.02497777716906, -0.03617986965071, 0.1016290821131, 1

Part.AndSelectByMark "Extrude1", "SOLIDBODY", -0.02823155779504, -0.04351551915801, 0.007861557497051, 2

' Thicken the selected reference surface and then generate a boss

Set FeatureBoss = Part.FeatureManager.FeatureBossThicken(0.01, 0, -842150451, 0, 1, 1, 0)

' Set the property values for the selected feature

Part.SelectedFeatureProperties 0, 0, 0, 0, 0, 0, 0, 1, 0, "Thicken1"

Part.SelectById2 "Extrude2", "SOLIDBODY", 0, 0, 0, swSelectOptionDefault

Part.SelectById2 "Thicken1", "SOLIDBODY", 0, 0, 0, swSelectOptionDefault

 

' Get the thicken feature definition object

Set FeatureBoss_DEF = FeatureBoss.GetDefinition

FeatureBoss_DEF.AccessSelections Part, Nothing

' Set the solid bodies that the thicken feature affects in the multibody part

FeatureBoss_DEF.FeatureScopeBodies = FeatureBossArray

' Update the definition of the thicken feature

FeatureBoss.ModifyDefinition FeatureBoss_DEF, Part, Nothing

' Display the number solid bodies affected by the thicken feature

Debug.Print FeatureBoss_DEF.GetFeatureScopeBodiesCount

' Display whether the results of this thicken feature are merged

partDebug.Print FeatureBoss_DEF.Merge

' Display whether all or only specific bodies were automatically selected for the thicken feature

Debug.Print FeatureBoss_DEF.AutoSelect

FeatureBoss_DEF.ReleaseSelectionAccess



Related SolidWorks Forum Content

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:   Create Thicken Feature Example (VBA)
*Comment:  
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) 2012 SP05

The search functionality within the web help is in a beta test phase and you may experience periodic delays or interruptions in its performance. These are the normal and ordinary features of a beta test and shall not under any circumstances give rise to any liability on the part of DS SolidWorks or its licensors. The topics within the Web-based help are not beta topics; they document API Help (English only) 2012 SP05.

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.