Jump to content

Pick list for attribute?


Big Mike

Recommended Posts

Is it possible to create a list to pick from, as an option for an attribute? (or maybe a good work around for what I'm trying to do?)

 

I'm creating a new title block (block) and for some of the attributes, the required value will usually be one of two or three options. A simplified example would be color...it will either be Red, Blue or Green. So rather than just having Red as the preset attribute value..and having to type blue or green when needed, I want to be able to pick one from a list. (or something like that).

 

I've been trying to see if a Field would work. I can add 'Red, Blue & Green' as comments or keywords in the drawing properties, and then use that to create a Field...but it just adds them all.

 

I thought maybe I could create a table with the different values, but I can't find a way to create a Field from a table, and even if I could, I'm not sure it would work how I want.

 

I could also add all three values as the preset for the attribute, then just delete the ones I don't want...but I'd prefer a more refined solution, if there is one.

 

Can anyone point me the right direction?

Link to comment
Share on other sites

Just curious...

 

Is/are there any specific criteria that would prompt your desire to change the attribute color (Plotting/CTB related), or is this purely an aesthetic function?

 

I could be wrong, but *IF* memory serves... a ._refedit alone will not change the color of the attributes (once the attribute has been given a value). One would have to ._refedit, insert a new instance of the desired block, and then translate the original values to the new attributes.

Link to comment
Share on other sites

The color was just an example. The values that I'm using are fabric specifications, "PE 12oz. F.R. WH/WH (RU88X-6FR)" for example. This is why I want to pick from a list, rather than having to type it out, or find it somewhere to copy/paste.

Link to comment
Share on other sites

Well attribute color, and attribute value (textstring property) are two completely different beasts! Why didn't you say so in the first place, my friend!?

 

If there is a specific bit of criteria (file name prefix, etc.) that in any way indicates which fabric would be needed, we can do this programmatically, with fields.

 

If not, then LISP can do the job handily, it's just more work... The pick list might just be a simple initget + getkword combo. But, it sounds like we need some additional criteria though, like title block name (effectivename property), attribute tag strings, and others, etc.

Link to comment
Share on other sites

I appreciate your help.

 

No, there is no specific criteria (associated with the drawing file) that would determine the fabric type...we just read it off of the work order and enter it into the drawing's title block.

 

It's been many years since I last dug into LISP programing, and I didn't dig too deeply. I figured that was the direction I might have to go...so I've been walking though an AutoLISP tutorial for the last half hour...but I'm still at the very basics.

Link to comment
Share on other sites

You're welcome.

 

No worries about the criteria, again presenting you with the options for fabric selection is the easy part. When you begin to dig into the title block attributes (and not that it's difficult), is where Visual LISP makes things real efficient.

 

I'm subscribed to this thread, so feel free to post back what you've put together, and I (or someone smarter!) will happy to help you out.

 

Good luck!

Link to comment
Share on other sites

Thanks, I'll look into that.

 

I'm actually getting into Sheet Sets for the first time, and while it doesn't appear to solve this particular issue, I think it will make a better workflow for me. And I might be able to hide the fabric spec. I need, in the sheet properties somewhere.

Link to comment
Share on other sites

Hey go old school !

 

You can pop side menu open and these can contain preset answers eg 1 2 3 4 5 etc or part numbers, you would need to create them but are pretty simple as they are a menu file. I used this method for brick widths ie pick 1 brick but answer is 237. Here is an example for sheet sizes

 

**SET_SH 2
[  SHEET ]
[  SIZE: ]
[--------]
[   A0   ]0
[   A1   ]1
[   A2   ]2
[   A3   ]3
[ A4 L'SC]4
[ A4 PORT]41
[   B1   ]5
[   B2   ]6
[--------]
[  USER  ]90
[  NONE  ]99

 

The number on the right is what is returned, you can definately return the pick menu as an answer to a lisp question rather than keyboard.

 

I haven't used for a while but its probably worthwhile a try. You can also join answers (use lisp) if you have a complicated part No red+velvet+straight 3 picks.

 

The other alternative is to just open a text file and populate a dcl list box, the advantage of the txt file is you can change answers without changing any program code.

 

Alanjt has a real nice version of a list box routine maybe ask him nicely to add open file to it. I would do it but its his to give away.

 

Your lisp would be pretty simple open file/s get answer/s then block command

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...