×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Get Custom Properties (Solidworks)

Get Custom Properties (Solidworks)

Get Custom Properties (Solidworks)

(OP)
Hi,
There are tonns of macros and small programs out there for custom properties but I cannot get out of them what I want. All I am looking to do is have a part or maybe and assembly open, then run the macro and a msgbox will appear giving me the property that I specify in the macro. There is one macro in the API Help but it loops through all the properties and gives you all of them in the debug Window. I would just like to specify which property i want to see.
Any body know this ? Thanks.

RE: Get Custom Properties (Solidworks)

Are you wanting to create the property if it doesn't exist, or edit it if it does, or just read it from the part/assy?

cheers

RE: Get Custom Properties (Solidworks)

The following macro will give the value of the custom property named "Description" for the active document in a message box.

CODE

Sub main()
MsgBox Application.SldWorks.ActiveDoc.Extension.CustomPropertyManager("").Get("Description")
End Sub

-handleman, CSWP (The new, easy test)

RE: Get Custom Properties (Solidworks)

(OP)
CorBlimeyLimey I just wanted to get the description property. What handleman has is exactly what i need thanks to both of you.

RE: Get Custom Properties (Solidworks)

Unless you are mapping the macro to an icon or shortcut key, it would be quicker to assign a key to File > Properties to enable viewing of all properties.

cheers

RE: Get Custom Properties (Solidworks)

I do the same as CorBlimeyLimey, I have a macro as well to have pulldown list but wait for 2009, it is complete and really efficient!

RE: Get Custom Properties (Solidworks)

I certainly wouldn't go so far as to say that, Matt.  It depends on how customized your macro is.  Ours stores about five pieces of information about our currently active job, and fills in all five custom properties with a single click.

-handleman, CSWP (The new, easy test)

RE: Get Custom Properties (Solidworks)

Howdy,

This may have something to do with my next API project. I've seen the demo of 2009 and it looks nice smile, but there is one feature related to this that we would like to see. When the drawing is active we'd like to see a list box report/display the custom properties from the model that are not being used on the drawing. I'm still using 2007 SP5.0 - Would someone let me know - Does 2009 give us this information?

Thanks

Tobin Sparks
www.nov.com

RE: Get Custom Properties (Solidworks)

Matt,

You're being too modest.  It will probably take SolidWorks 3 or 4 service packs worth of debugging before they're on par with your RigidCustomProperties. thumbsup   

Joe
SW Office 2008 SP4.0
P4 3.0Ghz 3GB
ATI FireGL X1

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources