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,
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
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
RE: Exapnding the "Source" property
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
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
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