TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: mailmaverick on June 13, 2020, 01:09:43 PM

Title: Block Attribute with Listed Values
Post by: mailmaverick on June 13, 2020, 01:09:43 PM
Hi,
I have created a Block with 1 Attribute in which the user can enter any value by going to Properties (CH command).
However, I want that user should be able to put a value among 1, 2 or 3 only.
There should be a dropdown in the Properties Window (using CH command) against the attribute such that the user can selected any one of the above three values (1, 2 or 3). How to add the dropdown against the attribute using LISP ?
Title: Re: Block Attribute with Listed Values
Post by: Lee Mac on June 13, 2020, 06:06:17 PM
You can accomplish this using a dynamic block, with no LISP required.
Title: Re: Block Attribute with Listed Values
Post by: ronjonp on June 15, 2020, 03:56:49 PM
As Lee mentioned, use a block properties table like so.
Title: Re: Block Attribute with Listed Values
Post by: mailmaverick on June 16, 2020, 07:41:17 PM
Thanks Lee and Ron. I am able to create the Dynamic Block by adding Attribute Definition and Block Table linked to the Attribute Definition manually and the block is working fine.

I am also able to add Attribute Definition through LISP.
But I am not able to add Block Table (linked to added Attribute Definition) through LISP.
Any leads on that ? Thanks.
Title: Re: Block Attribute with Listed Values
Post by: ronjonp on June 17, 2020, 11:36:42 AM
...
But I am not able to add Block Table (linked to added Attribute Definition) through LISP.
Any leads on that ? Thanks.

I don't know how to add that link via lisp. Why is a lisp solution needed for this? You create the block once then you're good right?
Title: Re: Block Attribute with Listed Values
Post by: mailmaverick on June 18, 2020, 02:17:46 PM
Actually there is not 1 block, I have many different blocks in which I have to add this functionality. Request other forum members to provide any leads if possible. Thanks.