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

Imperial unit Dimension

8 REPLIES 8
Reply
Message 1 of 9
aak194
470 Views, 8 Replies

Imperial unit Dimension

How can we retrieve imperial unit dimenion text as displayed through autolisp.
8 REPLIES 8
Message 2 of 9
Anonymous
in reply to: aak194

If picking the dimension text is an option...

(setq e (nentsel "\nSelect dimension text: "))
(setq str (cdr (assoc 1 (entget (car e)))))
"\\A1;\\A1;28'-8{\\H0.800000x;\\S1#2;}\""

Joe Burke
Message 3 of 9
aak194
in reply to: aak194

Dear Joe Burke
My question is not proper. Actually i need to put room sizes by picking a rectangle.
A sample drawing is attahed.
Thanks
Message 4 of 9
Anonymous
in reply to: aak194

Assuming you just want to pick the rectangle, you can get the distance between corner
points with LISP. I'm not sure how you'd determine which distance is the width and
which is the height.

An alternative would be pick two pairs of points. First the width and then the
height.

The distance values can be converted to text strings. Then the strings can be merged
using the strcat function.

Joe Burke

wrote in message news:6152380@discussion.autodesk.com...
Dear Joe Burke My question is not proper. Actually i need to put room sizes by
picking a rectangle. A sample drawing is attahed. Thanks
Message 5 of 9
Anonymous
in reply to: aak194

aak194 wrote:
> Dear Joe Burke My question is not proper. Actually i need to put room
> sizes by picking a rectangle. A sample drawing is attahed. Thanks
Perhaps you could use an MTEXT string that contains a field for the
first distance, an 'x', and a field for the second distance. Unlike the
string that AutoLISP would generate, such an entity would update to show
the correct dimensions as the design changed if each field were linked
to the length property of a line or wall segment.
Message 6 of 9
aak194
in reply to: aak194

Dear Joe Burke
Thanks for your intension to solve this. You are right that we need two distances WIDTH and HEIGHT but that distances are in decimals.
For example when we use GETDIST in autolisp the distance 2'-6" will be 30.00. I want the LENGTH of a object which will apear in a list command or DEFAULT TEXT value of any dimension.
AAK
Message 7 of 9
Anonymous
in reply to: aak194


If I understand your question, use the
LISP rtos function to convert a real number to a string.


style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
Dear
Joe Burke Thanks for your intension to solve this. You are right that we need
two distances WIDTH and HEIGHT but that distances are in decimals. For example
when we use GETDIST in autolisp the distance 2'-6" will be 30.00. I want the
LENGTH of a object which will apear in a list command or DEFAULT TEXT value of
any dimension. AAK
Message 8 of 9
aak194
in reply to: aak194

Hi Joe Burke
Please see the attached zip file. I think you can understand what i want.
Thanks
Message 9 of 9
Anonymous
in reply to: aak194

From what I see in your most recent example file, it seems like you've flip-flopped
back to your original question. If so, see my first reply.

BTW, if you are asking for someone to write the routine for you, I will not. Maybe
someone else would be interested.

Joe Burke

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

Post to forums  

Autodesk Design & Make Report

”Boost