Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

Pull Down Menu - How Can I Create 1

Status
Not open for further replies.

MN5520

Industrial
Jan 30, 2005
36
0
0
US
Any help will be appreciated!

Is there a way in SW (sw2005 sp3.0) to create your own pull down (drop down) menu in the custom properties?

I've considered using templates of each model but we have so many models that I'm affraid it might get to confusing.

An example:
I want to set up a custom property as follows:

Property Name Type Vale / Text Expression
MODEL TEXT (Use a pull down to select various models)
OPTION 1 TEXT (Use Pull Down to Select)
OPTION 2 TEXT (Use Pull Down to Select)

Thanks,
Brian
 
Replies continue below

Recommended for you

You can use VB or VB.NET. Download the API SDK from SolidWorks.com and install it. That will create a new project type call SW Add-in which will get you jumpstarted.

Evan T. Basalik, MCSD
--------------------------------
It's all about prioritization...
 
Can you be more specific about what you're trying to accomplish with this? Back up a bit & give us the big picture. You ask the question about making a menu, but what will you do with this menu? I have a gut feeling that there's already a way to do what you want without any programming. So let's see if I'm right.

[idea] SolidWorks 2005 SP01.1 / Windows 2000 Professional [idea]
 
TateJ,

The term "menu" may not be correct, "List" may be more appropriate.

If you go into custom properties now and add a custom property name with a type being text and then go to the "text/expression" field you can use a pull down list for items such as Material, Mass, density, Volume, etc.

What I would like to do is set up my own list of items to choose from in that field (or add & delete from the list that is there)

Brian
SW2005 sp3.0 XP Pro
 
Which of the 3 colums do you want to add properties to?
... and I hope it's the first column - that's easy - just type it right there.

If you want these properties to be available for all future parts - you need to save this part as a PART TEMPLATE - in the correct folder & it will be available for future parts.

Are we getting there yet?

[idea] SolidWorks 2005 SP01.1 / Windows 2000 Professional [idea]
 
Oh... Let's try this another way... Assume you get it to work - exactly as you want...
What would you do with it? What's the greater goal here?
I still bet there's a path to your destination - but I have no idea where you're going.


[idea] SolidWorks 2005 SP01.1 / Windows 2000 Professional [idea]
 
Ye Gods ... It's the Linked to value section he wants to add to.

dropdownoptions7xh.jpg


I know of no way to add to this,

[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
 
It is a good idea to do what you are asking with custom properties because it ensures that they are entered consistently and eliminates manual data entry. I do this with my custom properties routine. Take a look at the "Add Custom Properites" example in the API help. There is no need for an addin, you can do this with a VBA macro that calls a form. The form will contain either list boxes or combo boxes with the choices for each value. When the form is closed the selections are then written to the file custom properties.
 
Status
Not open for further replies.
Back
Top