So this is what I did in plain old AutoLISP to prompt the user for selecting arcs and then reversing their direction:
Code: Select all
(prompt "
reverse_arc.lsp
11/2013 knut hohenberg, no rights reserved.
"
)
(defun reverse_arc ( / selset n object objdat ang1 ang1)
(prompt "Select arcs to be reversed: ")
(setq selset (ssget '((0 . "ARC"))))
(if selset
(progn
(setq n 0.0)
(command "._undo" "_g")
(while (setq object (ssname selset n))
(setq objdat (entget object)
ang1 (cdr (assoc 50 objdat))
ang2 (cdr (assoc 51 objdat))
objdat (subst (cons 51 ang1) (assoc 51 objdat) objdat)
objdat (subst (cons 50 ang2) (assoc 50 objdat) objdat)
n (1+ n)
)
(entmod objdat)
)
(command "_.undo" "_end")
)
(prompt "No arcs selected ")
)
(princ)
)
(prompt "
...loaded. Type (reverse_arc) to invoke.
"
)
(princ)