Visual LISP, AutoLISP and General Customization
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Diesel expression help (area)
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
340 Views, 13 Replies
02-16-2010 12:03 PM
Can someone explain how I can update my diesel expression to display the area in square feet not square inches. See expression below. Thanks
^C^Cattdia;0;_-insert;AREABLK;\1;1;0;$M=$(getvar,A REA);attdia;1
^C^Cattdia;0;_-insert;AREABLK;\1;1;0;$M=$(getvar,A
Re: Diesel expression help (area)
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
02-16-2010 01:04 PM in reply to:
wilco4
I'm not fluent enough in Diesel, but Lisp should work in a macro like that, too, something like this:
^C^Cattdia;0;_-insert;AREABLK;\1;1;0;(/ (getvar 'area) 144);attdia;1
or if it needs to be a text string:
^C^Cattdia;0;_-insert;AREABLK;\1;1;0;(rtos (/ (getvar 'area) 144) 2 2);attdia;1
Change that last 2 if you want more [or fewer] decimal places.
--
Kent Cooper
wilco4 wrote...
Can someone explain how I can update my diesel expression to display the area in square feet not square inches. ....
^C^Cattdia;0;_-insert;AREABLK;\1;1;0;$M=$(getvar,A REA);attdia;1
^C^Cattdia;0;_-insert;AREABLK;\1;1;0;(/ (getvar 'area) 144);attdia;1
or if it needs to be a text string:
^C^Cattdia;0;_-insert;AREABLK;\1;1;0;(rtos (/ (getvar 'area) 144) 2 2);attdia;1
Change that last 2 if you want more [or fewer] decimal places.
--
Kent Cooper
wilco4 wrote...
Can someone explain how I can update my diesel expression to display the area in square feet not square inches. ....
^C^Cattdia;0;_-insert;AREABLK;\1;1;0;$M=$(getvar,A
Kent Cooper
Re: Diesel expression help (area)
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
02-16-2010 01:15 PM in reply to:
wilco4
Thanks for the help but it's still not working right. Below are the results I get:
^C^Cattdia;0;_-insert;AREABLK;\1;1;0;(/ (getvar 'area) 144);attdia;1 gives me the follwoing: (/ (getvar 'area) 144)
^C^Cattdia;0;_-insert;AREABLK;\1;1;0;(rtos (/ (getvar 'area) 144) 2 2);attdia;1 gives me the follwoing: (rtos (/ (getvar 'area) 144) 2 2)
Here's what I get using my current expression on the same room:
^C^Cattdia;0;_-insert;AREABLK;\1;1;0;$M=$(getvar,A REA);attdia;1 gives me 57600
Any thoughts?
^C^Cattdia;0;_-insert;AREABLK;\1;1;0;(/ (getvar 'area) 144);attdia;1 gives me the follwoing: (/ (getvar 'area) 144)
^C^Cattdia;0;_-insert;AREABLK;\1;1;0;(rtos (/ (getvar 'area) 144) 2 2);attdia;1 gives me the follwoing: (rtos (/ (getvar 'area) 144) 2 2)
Here's what I get using my current expression on the same room:
^C^Cattdia;0;_-insert;AREABLK;\1;1;0;$M=$(getvar,A
Any thoughts?
Re: Diesel expression help (area)
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
02-16-2010 01:37 PM in reply to:
wilco4
Oops -- it's taking input for an Attribute value literally, rather than evaluating the Lisp expression. Try starting with this:
^C^Cattdia;0;texteval;1;_-insert....
and then end with
....attdia;1;texteval;0
I'm not sure why it should take a Lisp expression literally but not a Diesel expression, when TEXTEVAL is 0, but as I said, I'm not very experienced with Diesel. However, if the above doesn't work, someone who is more familiar with it should be able to do the same calculation [dividing your original expression by 144] in Diesel language.
--
Kent Cooper
^C^Cattdia;0;texteval;1;_-insert....
and then end with
....attdia;1;texteval;0
I'm not sure why it should take a Lisp expression literally but not a Diesel expression, when TEXTEVAL is 0, but as I said, I'm not very experienced with Diesel. However, if the above doesn't work, someone who is more familiar with it should be able to do the same calculation [dividing your original expression by 144] in Diesel language.
--
Kent Cooper
Kent Cooper
Re: Diesel expression help (area)
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
02-16-2010 01:50 PM in reply to:
wilco4
Thanks again for trying but it's still not working. Below is my result using the latest expression:
(/ (getvar 'area) 144)
(/ (getvar 'area) 144)
Re: Diesel expression help (area)
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
02-16-2010 03:21 PM in reply to:
wilco4
{code}^C^Cattdia;0;_-insert;AREABLK;\1;1;0;$M=$(rt os,$(getvar,AREA),4,3);attdia;1{code}
Re: Diesel expression help (area)
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
02-16-2010 05:05 PM in reply to:
wilco4
Getting closer. That expression divides the square inches by 12 and it actually needs to be divided by 144. Thanks...
Re: Diesel expression help (area)
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
02-16-2010 06:20 PM in reply to:
wilco4
Maybe this?
{code}^C^Cattdia;0;_-insert;AREABLK;\1;1;0;$M=$(rt os,$(/,$(getvar,AREA),144),2,3);attdia;1{code}
{code}^C^Cattdia;0;_-insert;AREABLK;\1;1;0;$M=$(rt
Re: Diesel expression help (area)
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
02-16-2010 07:24 PM in reply to:
wilco4
That worked. Thanks for the help. One last question. Is there a way to remove the decimal point and/or zeros. It shows up as 400.000 if not no big deal.
Re: Diesel expression help (area)
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
02-16-2010 07:42 PM in reply to:
wilco4
Changing that 3 to a 0 [the precision argument in (rtos)] should do it.
--
Kent Cooper
wilco4 wrote...
.... Is there a way to remove the decimal point and/or zeros. ....
--
Kent Cooper
wilco4 wrote...
.... Is there a way to remove the decimal point and/or zeros. ....
Kent Cooper


