×
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

Exapnding the "Source" property

Exapnding the "Source" property

Exapnding the "Source" property

(OP)
Hello,

I would like to know if there is any way to expand the drop-down list in the "Source" property field. Per default it only has Made and Bought, which are already helpful, but I'd like to add a couple more for sorting purposes.

Thanks,

RE: Exapnding the "Source" property

@Csaba Solyom
No. You would have to use "Define other properties..." to create your own. Then click on the f(x) icon at the bottom of your CATIA screen to change your own parameter from single value to multiple values. Then go back to the properties and right-click in the parameter input field and select "Add Multiple Values...". If you need step by step instructions let me know and I can post more screen grabs.

Drew Mumaw
www.textsketcher.com
www.drewmumaw.com

RE: Exapnding the "Source" property

(OP)
Thanks, I'll try this when I get back to the office, and see if I can record a macro for it.

RE: Exapnding the "Source" property

Csaba,
I have a similar macro that adds a drop down property to my catpart.
something like this should work for you:

Language="VBSCRIPT"
Sub CATMain()
Set partDocument1 = CATIA.ActiveDocument
Set product1 = partDocument1.GetItem("Part1")

Set parameters1 = product1.UserRefProperties
Set strParam1 = parameters1.CreateString("Source2", "")
Dim arrayOfVariantOfBSTR1(2)
arrayOfVariantOfBSTR1(0) = "A"
arrayOfVariantOfBSTR1(1) = "B"
arrayOfVariantOfBSTR1(2) = "C"
strParam1.SetEnumerateValues arrayOfVariantOfBSTR1

Set product1 = product1.ReferenceProduct

End Sub

Change "Source2" to whatever you want your property to be named.
Change "A" "B" "C" to your drop down choices.
Add additional choices if needed (modify (#) if choices are added or removed).

RE: Exapnding the "Source" property

(OP)
@rickyt

Thank you, that is the exact macro I was looking for, works perfectly.

Edit: is there any way to mark this thread as SOLVED?

RE: Exapnding the "Source" property

@Csaba Solyom
just give rickyt a pink "Great post!" star so other viewers of the thread know the answer was helpful.

Drew Mumaw
www.textsketcher.com
www.drewmumaw.com

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