Betoniera
Guest
I want cofutatis, gp and other lisp magicians.
that below is an essential fragment of code that repeatedly writes a string of description and a reference line.
is used to describe the irons of the reinforced concrete sections. srive with right or left alignment depending on the tilt of the reference row.
the default string is d8/20 brackets, but it can be changed to suit.
here is the question: is it possible to obtain the predefined print of the string in the request of getstring so that you can change it without rewriting it again?
for example can I get the written d8/20 brackets already prepared so that if I want to insert brackets d10/25 cabio only the last letters?
Thank you for any suggestions
Hello, everyone.
;description staff.lsp
(if descst nil (setq descst "staffe %%c8/20"))
(setq a (strcat "\nimmetti text <" descst "> > )
descst1 (getstring t a) ; the parameter t serves to insert spaces in the text
)
(if (/= descst1") (setq descst descst1))
(setq descst2 (strcat " descst ")
)
(while (= 1 1); cycle from which it comes out
(command "_color" 3)
(setq p1 (getpoint "\nimmetti punto initial") ;first initial
p2 (getpoint p1 "\nimmetti punto label ") ;second point label
)
(command "_line" p1 p2 ")
(f) (car p2) (car p1))
(command "_text" p2 "" 0 descst2); write to the left
(command "_text" p2 "" 0 descst2); write to the right
)
);
(princ)
that below is an essential fragment of code that repeatedly writes a string of description and a reference line.
is used to describe the irons of the reinforced concrete sections. srive with right or left alignment depending on the tilt of the reference row.
the default string is d8/20 brackets, but it can be changed to suit.
here is the question: is it possible to obtain the predefined print of the string in the request of getstring so that you can change it without rewriting it again?
for example can I get the written d8/20 brackets already prepared so that if I want to insert brackets d10/25 cabio only the last letters?
Thank you for any suggestions
Hello, everyone.
;description staff.lsp
(if descst nil (setq descst "staffe %%c8/20"))
(setq a (strcat "\nimmetti text <" descst "> > )
descst1 (getstring t a) ; the parameter t serves to insert spaces in the text
)
(if (/= descst1") (setq descst descst1))
(setq descst2 (strcat " descst ")
)
(while (= 1 1); cycle from which it comes out
(command "_color" 3)
(setq p1 (getpoint "\nimmetti punto initial") ;first initial
p2 (getpoint p1 "\nimmetti punto label ") ;second point label
)
(command "_line" p1 p2 ")
(f) (car p2) (car p1))
(command "_text" p2 "" 0 descst2); write to the left
(command "_text" p2 "" 0 descst2); write to the right
)
);
(princ)