Community
AutoCAD LT Forum
Welcome to Autodesk’s AutoCAD LT Forums. Share your knowledge, ask questions, and explore popular AutoCAD LT topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

code problems - working out distance

2 REPLIES 2
Reply
Message 1 of 3
Anonymous
164 Views, 2 Replies

code problems - working out distance

hi all, i am trying to do a code that basically works out the distance between 2 points and then divide it by 75 with no numbers after the decimal point. i have written the code below but it only works when i remove the "dist;\\" and replace it with a "\" (this means that the user will have to know the distance already which i dot really want). has anyone got anyideas how to fix it?

^C^C_setvar;USERR1;dist;\\_setvar;userr2;$m=$(rtos,$(/,$(getvar,userr1),75),2,0);-Array;\\R;$(getvar,userr2);\75\ Message was edited by: dam_g8
oops forgot to say that the values are then used to array an object
2 REPLIES 2
Message 2 of 3
Anonymous
in reply to: Anonymous

You need two macros, not one: first is the dist, second is the rest of
your original macro perhaps?

--
Dean Saadallah
http://LTisACAD.blogspot.com
Add-on products for LT
http://www.pendean.com/lt
--
Message 3 of 3
mahahaavaahava
in reply to: Anonymous

Hi,

try this:

^C^C_setvar;USERR1;'dist;\\;_setvar;userr2;$M=$(rtos,$(/,$(getvar,userr1),75),2,0);-Array;\\R;$(getvar,userr2);\75\

At least I got to the Array part... and userr2 was 1/75th of userr1, no decimals...

Note that the dist is now 'dist ie. transparent! Also you had a space in userr2 and the array part I suspect is still in development...?

Also I thought the $m should be $M

/Petri Message was edited by: petri_ahava@msn

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

Post to forums  

”Boost