Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

DCL - set list_box attributes dynamically?

4 REPLIES 4
Reply
Message 1 of 5
BMcAnney
200 Views, 4 Replies

DCL - set list_box attributes dynamically?

I am just starting to learn DCL since I have a need to use it for a program. I am wondering if it is possible to dynamically assign the attributes of a list_box, instead of having to define them explicitly in the DCL file?

For example, I want the "value" attribute to change according to certain settings in the drawing (or perhaps based on which option the user chose last time the routine was run).

Another example would be setting the size of the list_box based on how long the list items are.

I do realize that I could have my lisp write out the DCL file each time it is initialized, but I am really hoping to avoid that.

Thanks!
Brent McAnney
4 REPLIES 4
Message 2 of 5
dgorsman
in reply to: BMcAnney

It can be done. Check out start_list, end_list, and add_list in the developer help. Also, check out the help section on handling list boxes.
----------------------------------
If you are going to fly by the seat of your pants, expect friction burns.
"I don't know" is the beginning of knowledge, not the end.


Message 3 of 5
BMcAnney
in reply to: BMcAnney

Thanks for the reply. I understand that I could build the list with the previous value first in the list, and then have my DCL code always have the first (0 index) item highlighted by default. But I am hoping that I can maintain my list in alphabetical order and have the highlighting (index atribute of the list_box) vary based on where the previous value sits in that list.

If this is possible, I'm not seeing how to do it. But I'm hoping that someone can prove me wrong (or even just let me know that it's not possible!)

Brent McAnney
Message 4 of 5
BMcAnney
in reply to: BMcAnney

I found the solution - (set_tile) is was I needed.

Thanks again,
Brent McAnney
Message 5 of 5
BMcAnney
in reply to: BMcAnney

So, I have figured out how to handle my first question, but I am still wondering if I can dynamically change the length (which is actually the height attribute) of a list_box depending on how many items are in the list. Does anyone know if this is possible?

Brent McAnney

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost