Visual LISP, AutoLISP and General Customization

Reply
*Expert Elite*
hmsilva
Posts: 2,639
Registered: ‎12-17-2004
Message 11 of 16 (125 Views)

Re: Changing the color of an attribute

02-10-2013 07:53 AM in reply to: rodb

rodb,
for setting the color temperature of the lamps, you ask the user to write the complete definition of the lamp
eg 32000k, six digits, facilitating the error by forcing the user to provide as high a number of digits,
might be more user friendly allow the user to provide only a few digits,perhaps something like

 

(initget 7 "2800k,28 3000k,30 32000k,32 34000k,34 4000k,40 5000k,50")
(setq ctemp (getkword "\n Choose Colour Temperature [(28)2800k/(30)3000k/(32)32000k/(34)34000k/(40)4000k/(50)5000k] :"))

 

this way allows the user, if choose the lamp of 32000k, just enter 32, making it easier to choose the lamp...

 

hope that helps

Henrique

Valued Contributor
rodb
Posts: 88
Registered: ‎03-24-2009
Message 12 of 16 (120 Views)

Re: Changing the color of an attribute

02-10-2013 09:21 AM in reply to: hmsilva

Thank you Henrique, thats a good idea, at the moment though the program allows the user to click on an on screen menu so all he has to do is fill in the lamp type using the keyboard and then click on the required color temperature, no typing required for the color temp selection. But sometimes people have set their computer to disable the on screen menu or they keep their mouse off the graphic screen area and don't see the menu so they would then have to type it in so I will make a short cut type in option like you suggest as well.   

Valued Contributor
rodb
Posts: 88
Registered: ‎03-24-2009
Message 13 of 16 (116 Views)

Re: Changing the color of an attribute

02-10-2013 09:23 AM in reply to: rodb

And I have just seen some extra zero's in my menu! Oh no!

*Expert Elite*
hmsilva
Posts: 2,639
Registered: ‎12-17-2004
Message 14 of 16 (110 Views)

Re: Changing the color of an attribute

02-10-2013 09:32 AM in reply to: rodb

You're welcome,rodb

the menu is a good solution, to prevent that someone disable the on screen menu, You may also consider using a DCL ...

 

Henrique

Valued Contributor
rodb
Posts: 88
Registered: ‎03-24-2009
Message 15 of 16 (90 Views)

Re: Changing the color of an attribute

02-10-2013 11:34 PM in reply to: hmsilva

Hmmm I have never used DCL but it could be very useful for me so I will definately look into it - thanks again!

Distinguished Contributor
area51visitor
Posts: 116
Registered: ‎03-05-2011
Message 16 of 16 (83 Views)

Re: Changing the color of an attribute

02-11-2013 12:01 AM in reply to: rodb

Sorry rob, my battman comment was in response to your original question: Can you change the color of a block attribute with lisp...

 

I see now there was more to it.

- Brian
"Very funny, Scotty. Now beam down my clothes."

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community