×
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

VB programming function name help ?

VB programming function name help ?

VB programming function name help ?

(OP)
Can anybody tell me the correct programming function name that allows me to make a "cutom property" name in SW, lets take for example I have a custom property name called "PLNOTE" i want my macro to add PLNOTE to every drawing I open up, this after I press the play button on my macro toolbar, and for the Type I want Text String, and for the value I want a "-" dash for now. I thought Property Let, Property Get, and Property Set where the right programming functions but I have a bad feeling I'm barking up the wrong tree using these functions, I've tried to use help on custom properties I didn't get anywhere, can anyone help me?

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

RE: VB programming function name help ?

Respectfully, you are quite disoriented.  Property Let/Get/Set are used for module-level property definitions in VB programs.  They do not set SW object properties.

The commands you want are ModelDoc2::AddCustomInfo3 and ModelDoc2::CustomInfo2.  These require a ModelDoc2 object st to your document of interest.  Keep in mind that AddCustomInfo3 does not change or overwrite existing properties.

There is a "Copy Custom Info" macro at <http://www.esoxrepublic.com/freeware/> that you may dissect and use, but not plagiarize.

I could be the world's greatest underachiever, if I could just learn to apply myself.
http://www.EsoxRepublic.com-SolidWorks API VB programming help

RE: VB programming function name help ?

(OP)
TheTick,

Thanks for you help on AddCustomInfo, the program works great ! I have the program delete all Custom Properties and VB creates the new one, you save me a lot of time. I really didn't feel like entering new properties in a hundred drawings.

I drink a pint for you !

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

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