Issue with Macro for Creating a Polyline with Width Reset in BricsCAD
Hello everybody!
I am trying to create a macro for drawing a polyline with a specific width using a button in BricsCAD. The following macro correctly starts the polyline drawing process:
^C^CORTHO;0;-LAYER;M;Geul;;PLINE;\
To set the polyline width to 0.5, I use the following commands separately:
Select;Last;;Pedit;Width;0.5;;
However, when I try to combine both commands into a single macro, it doesn't work as expected.
I also tried this approach:
^C^CORTHO;0;-LAYER;M;Geul;;PLINE;\W;0.5;0.5;
But the issue with this method is that the width remains at 0.5 even after the polyline is closed. I need the width to reset back to 0 after closing the polyline.
I’ve attempted various modifications, but I can’t get it to work properly.
Is there anyone who can help me resolve this issue?
Thanks in advance!
Comments
-
As its in a button you can have lisp code so can be easier like ^C^C(setvar 'ORTHO 0)(command "-LAYER" "M" "Geul" "") (setvar 'plwid 0.5) Pline
0 -
This almost worked. Changed it to a lisp:
(defun c:Geul ()
(command "ORTHO" "0")
(command "-LAYER" "M" "Geul" "")
(setvar "PLINEWID" 0.5)
(command "PLINE")
(while (= (getvar "CMDNAMES") "PLINE") (command pause))
(setvar "PLINEWID" 0)
)0 -
Look into the Autoload command we had a custom lisp that was loaded on startup using Autoload it loads on demand when you type it Guel on command line, we had like 20 autoload lisps.
1 -
Thanks!
0