Visual LISP, AutoLISP and General Customization
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Create a menu option to draw a polyline of varying segments
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
I am drawing evacuation signs at the moment. I would like to create a menu option that allows me to draw a polyline to show the exit path and then change it's color and linetype. I would also like to fillet the corners of the newly created line.
My immediate challenge is to create the menu option that draws the polyline with varying number of segments
^C^C_pline\\\\ this would pause four times for input, but the pline may be 1 to 20 segments for example.
It seems that I can't do this as a macro in the menu can anyone show me another way.
Thanks,
Alan
Solved! Go to Solution.
Re: Create a menu option to draw a polyline of varying segments
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
alan.rackham wrote:....I would like to ... draw a polyline ... and then change it's color and linetype. I would also like to fillet the corners of the newly created line.
... with varying number of segments
^C^C_pline\\\\ this would pause four times for input, but the pline may be 1 to 20 segments for example.
....
It's the old keep-pausing-for-User-input-until-the-command-is-d
^C^C_pline (while (> (getvar 'cmdactive) 0) (command pause)) +
_chprop L ;_color yourcolor _ltype yourlinetype ;+
_fillet _radius yourradius _polyline _last
Re: Create a menu option to draw a polyline of varying segments
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Kent
Thanks for your response. I get the idea, but I get this message on the screen:-
Specify start point: (while (> (getvar "cmdactive") 0) (command pause)) _chprop
Invalid point.
Alan
Re: Create a menu option to draw a polyline of varying segments
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Kent
Thanks for the tip. My final solution was to write it in lisp and load it using the ribbon menu. Here's my final lisp for anyone that is interested:-
(defun c:MEP ()
(command "pline")
(while (> (getvar "cmdactive") 0) (command pause))
(command "chprop" "L" "" "Color" "Yellow" "ltype" "EvacPathLine" "")
(command "fillet" "radius" "1.5" "fillet" "polyline" "L")
(command "pedit" "L" "width" "1.5" "")
)
Thanks,
Alan
Re: Create a menu option to draw a polyline of varying segments
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
alan.rackham wrote:...I get this message on the screen:-
Specify start point: (while (> (getvar "cmdactive") 0) (command pause)) _chprop
Invalid point.....
That's interesting. I have various macros that include Lisp functions, so I assumed any Lisp function would work in a macro. But I don't have any with (while) functions -- it looks as though those can't be used that way, for some reason. That's good to know, at least, if only because there may be others like that, so I shouldn't assume....
I would have next suggested the fully-Lisp approach instead, but it looks like you've figured that out.
