11-02-2023
05:11 AM
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Denunciar
11-02-2023
05:11 AM
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
Etiquette and Ground Rules of Autodesk Community