Announcements
Due to scheduled maintenance, the Autodesk Community will be inaccessible from 10:00PM PDT on Oct 16th for approximately 1 hour. We appreciate your patience during this time.
AutoCAD for Mac Forum
Welcome to Autodesk’s AutoCAD for Mac Forums. Share your knowledge, ask questions, and explore popular AutoCAD for Mac topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

divide multiple lines

9 REPLIES 9
Reply
Message 1 of 10
ruirego
302 Views, 9 Replies

divide multiple lines

hello, any way to select several lines and divide all? now that Autocad Mac as LISP maybe its possible!?

 

thanks

R^2 

9 REPLIES 9
Message 2 of 10
maxim_k
in reply to: ruirego

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?

 


Do you find the posts helpful? "LIKE" these posts!
Have your question been answered successfully? Click 'ACCEPT SOLUTION' button.


Maxim Kanaev
Architect
MARSS

MacACAD | Linkedin

Etiquette and Ground Rules of Autodesk Community
Message 3 of 10
maxim_k
in reply to: ruirego

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)
)

Do you find the posts helpful? "LIKE" these posts!
Have your question been answered successfully? Click 'ACCEPT SOLUTION' button.


Maxim Kanaev
Architect
MARSS

MacACAD | Linkedin

Etiquette and Ground Rules of Autodesk Community
Message 4 of 10
ruirego
in reply to: maxim_k

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

 

Message 5 of 10
maxim_k
in reply to: ruirego

@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.

 


Do you find the posts helpful? "LIKE" these posts!
Have your question been answered successfully? Click 'ACCEPT SOLUTION' button.


Maxim Kanaev
Architect
MARSS

MacACAD | Linkedin

Etiquette and Ground Rules of Autodesk Community
Message 6 of 10
ruirego
in reply to: maxim_k

here do i paste this code?
Message 7 of 10
maxim_k
in reply to: ruirego


@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

 


Do you find the posts helpful? "LIKE" these posts!
Have your question been answered successfully? Click 'ACCEPT SOLUTION' button.


Maxim Kanaev
Architect
MARSS

MacACAD | Linkedin

Etiquette and Ground Rules of Autodesk Community
Message 8 of 10
ruirego
in reply to: maxim_k

Hello Maxim, i'm in Autocad LT 2024 for Mac

can i do this LISP?

tks
Message 9 of 10
maxim_k
in reply to: ruirego

@ruirego 

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.

 


Do you find the posts helpful? "LIKE" these posts!
Have your question been answered successfully? Click 'ACCEPT SOLUTION' button.


Maxim Kanaev
Architect
MARSS

MacACAD | Linkedin

Etiquette and Ground Rules of Autodesk Community
Message 10 of 10
ruirego
in reply to: maxim_k

thanks Maxim!

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

Post to forums  

Autodesk Design & Make Report