Polyline thickness

Polyline thickness

joe_kohli
Advocate Advocate
1,269 Views
7 Replies
Message 1 of 8

Polyline thickness

joe_kohli
Advocate
Advocate

I want to add a command to my tool palette to allow me to select the polyline from the palette and it will use all the settings I need. Would this need to be a LSP? Or how can I do this? Here are the settings that I need everytime for the particular polyline.

 

joe_kohli_0-1719591042707.png

 

0 Likes
1,270 Views
7 Replies
Replies (7)
Message 2 of 8

cadffm
Consultant
Consultant

Hi,

you need to use a command tool instead of a polyline tool,

so you can set up a macro

 

Copy a command tool (or create a new one by drag&drop a "command" from CUI dialog to your toolpalette?

Right click on your new commandtool, properties, edit 

 

^C^C^C_pline;

and so on

Discovy the command workflow by your own in commandline

Type in PLINE<enter>

(Enter in macro is ";")

Sample

https://forums.autodesk.com/t5/autocad-forum/general-polyline-width-changes-after-polyline-from-tool...

 

 

Sample

 

Sebastian

0 Likes
Message 3 of 8

pendean
Community Legend
Community Legend

@joe_kohli wrote:

I want to add a command to my tool palette...


End users are not given access to core features like PROPERTIES palette in AutoCAD: Sorry.

 

Are you just looking for MATCHPROP command instead, or need to create a custom version of that as a pop-up?

 

0 Likes
Message 4 of 8

joe_kohli
Advocate
Advocate

I am running the code below. I am getting a different color (brownish) while I draw the polyline but when I am finished it turns to the desired red color. Why is this happening?

 

(defun C:pipingline (/ plw currLayer)
;; Save the current polyline width and current layer
(setq plw (getvar 'plinewid))
(setq currLayer (getvar 'clayer))

;; Set the polyline width to 0.02
(setvar 'plinewid 0.02)

;; Check if the "PIPING" layer exists, if not, create it
(if (not (tblsearch "layer" "PIPING"))
(command "_.layer" "M" "PIPING" "")
)

;; Set the current layer to "PIPING"
(setvar 'clayer "PIPING")

;; Start the polyline command
(command "_.pline")

;; Wait for the polyline command to complete
(while (> (getvar 'cmdactive) 0) (command pause))

;; Restore the original polyline width and layer
(setvar 'plinewid plw)
(setvar 'clayer currLayer)

(princ)
)

 

(view in My Videos)

0 Likes
Message 5 of 8

cadffm
Consultant
Consultant

@cadffm wrote:

Copy a command tool (or create a new one by drag&drop a "command" from CUI dialog to your toolpalette)


OR, much simpler - Edit your Polyline Flyout, change "Flyout use" to NO

and you get a commandtool. Change the command string to your needs now.

 

 

Sebastian

0 Likes
Message 6 of 8

cadffm
Consultant
Consultant

Hi,

 

you should see the 'rubber band', standard is orange and dashed.

If you using MOVE command, between the first(base) and the second(target) point, is there an orange dashed rubber band, or also this brown continuous line?

 

 

 

 
 

 

 

Sebastian

0 Likes
Message 7 of 8

joe_kohli
Advocate
Advocate

It is orange an dashed!

0 Likes
Message 8 of 8

cadffm
Consultant
Consultant

unusual

I see the dashed orange line as it should

 

Start pipingline by commandline, same?

Command: pipingline<enter>

 

what happen if you enter this (and move your mouse)

Command: (getpoint '(0 0 0))<enter>

 

?

Sebastian

0 Likes