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
Xline Lisp to draw two or more parallel xlines space with a give distance.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
I am looking for a lisp that will draw two or more parallel xlines space with a give distance. If there is no lisp already created, can someone help me to create one?
Thanks
danny
Re: Xline Lisp to draw two or more parallel xlines space with a give distance.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Can you please provide more details about your goal of the code ?
Re: Xline Lisp to draw two or more parallel xlines space with a give distance.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Simple program to start with. Creates Horizontal Xlines based upon start point, number and spacing
;Degrees to Radians
(defun dgtrad(a)
(* a (/ PI 180.0))
)
;Point Offset
(defun newpt (a b c d e / x)
(setq x (polar a (dgtrad c) b))
(setq x (polar x (dgtrad e) d))
(setq x x)
)
;
(defun c:autoxl()
(echooff)
(setq no (getint "\Enter number of xlines: "))
(setq spacing (getreal "\nEnter desired spacing: "))
(setq pt (getpoint "\nSelect desired point: "))
(repeat no
(command "XLINE" "H" pt "")
(setq pt (newpt pt spacing 90 0 0))
)
)
If this is what you are looking for, I can expand program for Horizontal, Vertical, or Angled
Re: Xline Lisp to draw two or more parallel xlines space with a give distance.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
I would like the lisp to work like the Mline command, but instead of it drawing Mline it draws xlines.
What I am trying to do is cut down the number of commands and clicks I have to do to create an elevation from a floor plan and wall section.
Right now I draw a vert. or horz. Xline at both corners of each window mullion and exit the command. Then, I use the copy command to select both xlines and proceed to past them at other window mullion locations.
Since I already know my mullion width, I would like to be able to do the xline command and do the following prompts:
- Select horz., vert. or angle
- Select the number of lines
- Enter a value or values for the line spacing
- Choose where I want the justification to be (left, right or center)
See attachment
Re: Xline Lisp to draw two or more parallel xlines space with a give distance.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
dkeyser wrote:I am looking for a lisp that will draw two or more parallel xlines space with a give distance. If there is no lisp already created, can someone help me to create one?....
As a "raw" answer to this, not expanded into the multiple-mullion needs of your latest post, try the attached MultiXLine.lsp with its MXL command.
And for something very similar to your latest description [except that it divides the overall area equally], try PanelDivRect.lsp at the end of this thread:
Re: Xline Lisp to draw two or more parallel xlines space with a give distance.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Kent1Cooper wrote:
dkeyser wrote:I am looking for a lisp that will draw two or more parallel xlines space with a give distance. ....
As a "raw" answer to this, ... try the attached MultiXLine.lsp with its MXL command.
....
Enhanced version: I figured out how to make it DYNAMIC -- it shows you what you're going to get as you move the cursor around at the through-point prompt.
It doesn't have some of the other Xline options yet, but I'll keep working on it [I want to add Hor/Ver/Ang, but don't picture Bisect/Offset being useful for multi-Xlines]. I have a notion that it might even be possible to allow for defined Styles similar to what you can do in Mline. And I'm looking into getting it to honor Osnaps on the second point [there are threads about (grread) vs. Osnap that I need to plow through].
Re: Xline Lisp to draw two or more parallel xlines space with a give distance.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Thanks Kent, do you think it is possibly to have it setup where you can paste 2 lines at once and do it multiple times without having to reenter the command? Example would be how xline command works now.
danny

