Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations cowski 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
Joined
Apr 15, 2009
Messages
40
Location
US
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!
 
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)
 
Thank you! It worked.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top