elbaha
Guest
Good morning to all, my name is fabio and furniture design in style
a few years ago, also helped by your professionalism, I tried to automate the extraction of the length of a frame through attributes, reading the length of a polylinea and transferring it to an empty attribute
The syntax is this:
(defun c:corniceu1 (/ ss lis idx obj)
(vl-load-com)
(setvar "cmdecho" 0)
(setq a_tot 0)
(command "_area" "_o" "_l")
(setq ac (rtos (/ (getvar "perimeter") 1) 2 2))
(setq acc (vl-string-subst," ac))
(setq width (getint " insert width :"))
(setq thickness (getint " insert thickness :"))
(setq ins_p (getpoint "\n start frame :"))
(command "-inser" "cornice.dwg" ins_p "" """ thickness width acc "")
(princ)
everything works perfectly but, if in the same design select the initial point of another polyline to determine the length, this is the answer:
frame start:
*no valid selection*
requires a point or last
; error: function canceled
Can you please give me a hand?
thanks in advance
fabio
a few years ago, also helped by your professionalism, I tried to automate the extraction of the length of a frame through attributes, reading the length of a polylinea and transferring it to an empty attribute
The syntax is this:
(defun c:corniceu1 (/ ss lis idx obj)
(vl-load-com)
(setvar "cmdecho" 0)
(setq a_tot 0)
(command "_area" "_o" "_l")
(setq ac (rtos (/ (getvar "perimeter") 1) 2 2))
(setq acc (vl-string-subst," ac))
(setq width (getint " insert width :"))
(setq thickness (getint " insert thickness :"))
(setq ins_p (getpoint "\n start frame :"))
(command "-inser" "cornice.dwg" ins_p "" """ thickness width acc "")
(princ)
everything works perfectly but, if in the same design select the initial point of another polyline to determine the length, this is the answer:
frame start:
*no valid selection*
requires a point or last
; error: function canceled
Can you please give me a hand?
thanks in advance
fabio