May 18, 2011 at 3:06 pm #162887
I thought that this could be a good discussion to have on here. List your favorite and most handy LISP’s here.
;; ============ PolyMatch.lsp ===============
;; Will match the Elevation, layer, colour
;; Linetype, linetype scale, and lineweight
;; of a selected Polyline to every Polyline
;; in a selection set.
;; (Will unlock any locked layers)
;; SYNTAX: pmtch
;; Copyright (c) 2009, Lee McDonnell
;; (Contact Lee Mac, CADTutor.net)
;; No Restrictions,
;; only tested in ACAD 2004.
;; 1.0 ~ 14.04.2009
(defun c:pmtch (/ ent cObj lay col lt lts lw el ss)
(if (and (setq ent (car (entsel "nSelect Polyline to Match: ")))
(eq "AcDbPolyline" (vla-get-ObjectName
(setq cObj (vlax-ename->vla-object ent)))))
(setq lay (vla-get-layer cObj)
col (vla-get-color cObj)
lt (vla-get-linetype cObj)
lts (vla-get-linetypescale cObj)
lw (vla-get-lineweight cObj)
el (vla-get-Elevation cObj))
(if (setq ss (ssget (list (cons 0 "*POLYLINE")
(if (getvar "CTAB")
(cons 410 (getvar "CTAB"))
(cons 67 (- 1 (getvar "TILEMODE")))))))
(progn (vlax-for lay (vla-get-layers
(vla-put-lock lay :vlax-false))
(foreach Obj (mapcar 'vlax-ename->vla-object
(mapcar 'cadr (ssnamex ss))))
(vla-put-elevation Obj el)
(vla-put-layer Obj lay)
(vla-put-color Obj col)
(vla-put-linetype Obj lt)
(vla-put-linetypescale Obj lts)
(vla-put-lineweight Obj lw)))
(princ "n<!> No Polylines Selected <!>")))
(princ "n<!> No Polyline Selected <!>"))
(princ))May 18, 2011 at 3:11 pm #162897
This will match the Elevation, layer, color, Linetype, linetype scale, and lineweight of a selected Polyline to every Polyline in a selection set.May 18, 2011 at 3:12 pm #162896
Turns those old fashioned leaders into more convenient MLeadersMay 18, 2011 at 3:17 pm #162895Jason T. RadiceParticipant
Great topic. I could never get the match elevation thing to work….maybe this one will. Thanks!May 18, 2011 at 3:24 pm #162894
It does, found it today after a long time of seraching… very handy so far. I had a grading plan done by another firm that had no elevation information, so to manually go through and click every polyline and go to the properties dialogue was waaay too tedious. Found this one and it works great. I put an elevation on the first segment, and change the color to something else to keep track of my progress and plod away. So much easier.May 18, 2011 at 4:50 pm #162893Chris Markham, RLAParticipant
Does anyone have a LISP for putting parking spaces on a curve?May 18, 2011 at 5:05 pm #162892David BarbarashParticipant
I tend to cheat in these situations and make a block out of a single parking space line, then use the MEASURE or DIVIDE command, select the edge of pavement line, specify the block to use and the spacing being sure to align to the source object. Then just select the lines the command created and explode them to return them to the polylines they should be.May 18, 2011 at 5:47 pm #162891Dennis J. Jarrard, PLA, CLARBParticipant
Many years ago I worked for a company that only used Microstation as our cad program. I used a third party add on called Triforma for Landscape Architecture. It was a great program. Lots of similarities in its ease of use like Land FX, however it had a site planning component that allowed such crazy things as placing parking spaces on a curve with great accuracy. I cannot believe there isn’t something out there that will do this.
What I do today works great. Set your arc’d curve of your parking, then offset the depth of the the space (18′-0″). Now create a circle with radius 9′-0″ (9′ stall width). Determine the starting point of your first parking space then snap / copy a circle along the offset line every 9′. Making sure the center of the circle intersects with the line and the next circle. Once you have the circles along the curve in place then just simply snap to intersection of the circle and snap perpendicular to your original curve. Your parking spaces will be accurately spaced.May 18, 2011 at 7:56 pm #162890Jason T. RadiceParticipant
I too recall seeing something like this years ago in another program I think was more civil based, but not in autocad. I generally draw a few lines at the measurement I want perpendicular to the curve, do a UCS align to the last space and mirror. Rinse…repeat. Because you are mirroring more spaces each time, you get exponentially faster. Faster than trying to figure out a divide or array which you will still have to mess with. I’m lazy and proud.May 18, 2011 at 8:23 pm #162889
Curved parking. Seems to work, but test it out.
Run it with “a-p” at the command line.April 1, 2013 at 5:20 pm #162888Tonie C.Participant
I haven’t tried this yet, but thanks Dennis and Jon for such specific info!
- You must be logged in to reply to this topic.