Anuncios

The Autodesk Community Forums has a new look. Read more about what's changed on the Community Announcements board.

maxim_k
en respuesta a: 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