Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

SolidWorks API - accessing feature

Status
Not open for further replies.

mihalj

Mechanical
Apr 15, 2009
40
Hi,
I have part inside assembly and I am trying to access feature of part inside assembly and suppress it or unsuppress it based on some conditions.
I tried with (example)
swFeature = swModel.Parameter("featureName@partName.sldprt")
booleanValue = swFeature.ISetSuppression2(1,2,1,"Default")

but I could not run it. Does anyone know is it even possible to do it this way (through parameter)or I need to use some other way.
And by the way I am using VisualBasic .Net as language.
Thanks!
 
Replies continue below

Recommended for you

swModel.Parameter can only be used to retrieve pointers to a Dimension object. What you want is PartDoc::FeatureByName.

-handleman, CSWP (The new, easy test)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor