hello, any way to select several lines and divide all? now that Autocad Mac as LISP maybe its possible!?
thanks
R^2
Hi @ruirego ,
Do you mean DIVIDE command where you get points or blocks along an object (lines)?
How are these lines located relative to each other? Can you provide screenshot?
If you need to divide LINEs from selection set of objects, try to use something like this:
(defun c:Multidivide ( / oldcmd ss1 num)
(setq oldcmd (getvar "CMDECHO"))
(setvar "CMDECHO" 0)
(defun sstolist (ss / sscnt)
(setq sscnt 0
sslist nil)
(repeat (sslength ss)
(setq sslist (cons (ssname
ss sscnt) sslist))
(setq sscnt (1+
sscnt))
)
(princ)
)
(prompt "Select objects to divide: ")
(ssget)
(setq ss1 (ssget "P" '((0 . "LINE"))))
(sstolist ss1)
(setq num (getint "Enter the number of parts to divide: "))
(foreach n sslist (command "DIVIDE" n num))
(setvar "CMDECHO" oldcmd)
(princ)
)
hello, yes its the command DIV.
a can make line by line, but it would be better if i could select several lines, and DIV all at the same time.
in the screenshot attached in pink there are several lines
R^2
@ruirego ,
Try THIS LISP.
It prompts to select objects, filters lines from the selection set, asks for a number of divisions and divide selected lines.
You may need to adjust point style to see the results.
@ruirego wrote:
here do i paste this code?
No, download attached LSP and use APPLOAD command to load it to each drawing.
The command name is Multidivide
You asked about LISP and didn't mention that you use AutoCAD LT for Mac.
AutoLISP is not a feature of AutoCAD LT for Mac, unfortunately you cannot use AutoLISP in AutoCAD LT for Mac.
Can't find what you're looking for? Ask the community or share your knowledge.