polyline lisp routine works

Discussion of MicroSurvey CAD related issues and questions.

Moderators: Brian Sloman, Jason Poitras, James Johnston

polyline lisp routine works

Postby artb » Sat Dec 11, 2004 11:25 pm


This is a Polyline lisp routine to set a common width to an unlimited number of individual lines or arcs. This solution is in conjunction with an earlier post that I placed on November 11/2004 looking for help to resolve the line width problem.

A typical use for me is to put a width to the bold borders that we have to put on legal plans where survey posts require the lines to be trimmed where survey posts are inserted. This routine should not be used on a series of connected lines that are NOT broken by a survey post symbol.

This routine works in the mscad2001 version and presumably it will also work in the newer versions as well.

Other uses may well be found.

Thanks go to Darcy Detlor for providing the basic code to make it work. I just added the portion to make it usable on more than one line.

Briefly the routine will first ask for the width you need to use and then you can pick as many lines as you need to. Each line will automatically be converted to a polyline with your chosen width set to it. To exit the routine you just hit the < enter > key instead of picking another line. You will then have to hit the escape key to return to the command line. I didn't figure out a cleaner way to exit the routine so if someone else can add that it would be appreciated. I have included the code below. If you don't want to type it out I have included a hot link where you can download the routine directly. I have included in the download version the instructions to use it (a bonus for downloading it).

Here is the code
(defun c:wid()
(setq width (getreal "\nEnter a width: "))
(while (> width 0)
(setq ent (entsel))
(setq ename (car ent))
(command "polyedit" ename "y" "w" width "")

The hotlink to downoad the above file ( with instructions) is:


Posts: 53
Joined: Thu Oct 28, 2004 8:51 pm
Location: Vernon, B.C.

Return to MicroSurvey CAD

Who is online

Users browsing this forum: No registered users and 2 guests