kaleksiejczyk
2008-07-22, 04:39 PM
Hello,
I have the following lisp that works well for us but we are looking to edit it slightly:
(defun C:/ ()
(setvar "cmdecho" 1)
(setq p1 (getpoint "\nPick Point 1:"))
(setq p2 (getpoint "\nPick Point 2:"))
(setq val1 (distance p1 p2))
(setq val2 (getreal "Second number to be divided: "))
(setq val3 (/ val1 val2))
(command "offset" val3)
)
This is one of the lisps from cadalyst I do believe. Its a lisp that allows us to divide a selected distance "val1 (distance p1 p2)" by a certain number "Second number to be divided" and then dump that into the offset command. Rather simple all in all.
Now what we are looking for is to view VAL1 before we enter "Second number to be divided". Basically we are looking to select the space between two lines and then decide on the number of equal spaces we need by seeing VAL1. Currently we need to use the distance command, view the distance between these two lines, then invoke the / command above. I would like to skip the whole distance command part and just use the / command outlined here. I have tried several things but nothing has worked.
Thank you all for any assistance you can give me.
KA
I have the following lisp that works well for us but we are looking to edit it slightly:
(defun C:/ ()
(setvar "cmdecho" 1)
(setq p1 (getpoint "\nPick Point 1:"))
(setq p2 (getpoint "\nPick Point 2:"))
(setq val1 (distance p1 p2))
(setq val2 (getreal "Second number to be divided: "))
(setq val3 (/ val1 val2))
(command "offset" val3)
)
This is one of the lisps from cadalyst I do believe. Its a lisp that allows us to divide a selected distance "val1 (distance p1 p2)" by a certain number "Second number to be divided" and then dump that into the offset command. Rather simple all in all.
Now what we are looking for is to view VAL1 before we enter "Second number to be divided". Basically we are looking to select the space between two lines and then decide on the number of equal spaces we need by seeing VAL1. Currently we need to use the distance command, view the distance between these two lines, then invoke the / command above. I would like to skip the whole distance command part and just use the / command outlined here. I have tried several things but nothing has worked.
Thank you all for any assistance you can give me.
KA