is it posible to use DISTANCE as data for another command?

is it posible to use DISTANCE as data for another command?

damian.soler
Explorer Explorer
778 Views
7 Replies
Message 1 of 8

is it posible to use DISTANCE as data for another command?

damian.soler
Explorer
Explorer

Hi Everyone

 

As the title says, i'm looking for a way to use the data stored in the DISTANCE command (wich you set by using the DIST command) in another command

 

i would like to use that data in a 'CAL but don't know how to use it

 

or, for example: you set the distance with DIST and then you want to su that data as the radius for a CIRCLE

how do i tell the CIRCLE command to use the data in DISTANCE?

 

thanks in advance

0 Likes
Accepted solutions (2)
779 Views
7 Replies
Replies (7)
Message 2 of 8

cadffm
Consultant
Consultant

In LT?

Someone other could know a direct way, but my knowledge is limited to:

You need to use a menumacro (button in ribbon,toolbar or toolpalette)

Create a button with this macro inside:

$M=$(getvar,DISTANCE);

Sebastian

0 Likes
Message 3 of 8

cadffm
Consultant
Consultant

..but if you used the DIST command only to know the value for the next circle rad for example,

you can go another way:

Start CIRCLE command, choose the centerpoint, start '_quickcalc (type in or right-click calculator),

use the 'Dist between two points' Option and after this [Apply] and <enter>

 

Sebastian

0 Likes
Message 4 of 8

pendean
Community Legend
Community Legend
What is it you are trying to achieve ultimately with that DISTANCE read-only variable info?

0 Likes
Message 5 of 8

damian.soler
Explorer
Explorer

Hi, thanks for the response

 

i want to use DISTANCE data in a 'CAL

 

i don't know how to call that variable to use it inside a 'CAL, for example i would like 'CAL to calculate DISTANCE/90 and use that info as a circle radius, like this:

 

_Circle

(set base point)
(when CIRCLE ask for the radius, pause it with 'CAL)

(also pause 'CAL to set de DISTANCE variable using DIST)

(recover the DISTANCE data and use it in 'CAL, the result goes to the paused CIRCLE command and voila)

 

i know is hard to achieve but i think it could be posible, just don't know how to recover the DISTANCE data and use inside 'CAL

0 Likes
Message 6 of 8

pendean
Community Legend
Community Legend
Accepted solution

Like this from HELP in LT

pendean_0-1659538985732.png

 

 

Command: CIRCLE
Specify center point for circle or [3P/2P/Ttr (tan tan radius)]:
Specify radius of circle or [Diameter]: d
Specify diameter of circle: 'cal
>>>> Expression: getvar(distance)
Resuming CIRCLE command.
Specify diameter of circle: 5.7813629320116

 

0 Likes
Message 7 of 8

cadffm
Consultant
Consultant
Accepted solution

next time, write the whole story first 🙂

 

'cal

<perfect help page given by pendean>

and here is your sample distance/90

 

circle

<centerpoint>

'cal

getvar(distance)/90

 

that's all.

 

[F1] that's it.

 
 

 

 

Sebastian

0 Likes
Message 8 of 8

damian.soler
Explorer
Explorer

Thank you so much everyone 😄

0 Likes