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!

Removing properties in a part and assy using macros?? 3

Status
Not open for further replies.

2000mustanggtguy

Mechanical
Mar 16, 2005
83
Does anybody know of an easy way to remove all custom properties of all parts and assy ? What I've been doing so far is open each part and then delete each property, and that gets old really quick. If any body knows a button i can push or a pulldown menu in Solidworks that would be really cool.

I've done this in Wildfire 2.0 and there has to be way to do this SW2005.

Printed Circuit Board Designer
Salt Lake City, Utah
Stangs rule!
 
Replies continue below

Recommended for you

If you know what the custom props are you may be able to use one of the editors listed in thread559-125139.

[cheers]
Making the best use of this Forum. faq559-716
How to get answers to your SW questions. faq559-1091
Helpful SW websites every user should be aware of. faq559-520
 
I have a macro somewhere in my inventory that does exactly this, but not currently on my website. If I find it tonight I will post it.
 
The quick and dirty to do it through API would be to...

1) Set active document to be "Part" ModelDoc2 obhect and get number of custom properties using Part.GetCustomInfoCount2

2) using a For-Next loop to iterate through each custom property (number of iterations would be determined by the value obtained in step 1), get the name of the custom property using Part.GetCustomInfo2

3) Using either the same loop, or a different loop, use the names obtained in step 2 to delete custom properties using Part.DeleteCustomInfo2


 
Thanks for all your help guys !

Printed Circuit Board Designer
Salt Lake City, Utah
Stangs rule!
 
Hi, 2000mustanggtguy:

Did you find a way to remove all custom properties of a part or an assembly document? I am looking for the same solution.

Thanks,

Alex
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor