AutoCAD Visual LISP / AutoLISP :: Assign Elevations To Polylines Sequentially At A Set Interval
Nov 27, 2013
have a lisp routine that will ask you the starting elevation and the elevation interval, then allows you start selecting polylines and it assigns them new elevations based on your choices?
It seems years ago I had a routine that did this and it also changed the color of the polyline so you could tell which ones you had already changed, but I can't seem to find it now.
View 2 Replies
ADVERTISEMENT
May 28, 2013
A quick lisp routine to extract the elevations of a selection set of 2d polylines? I have a massive "contour" file composed of 2d polylines with elevations. I need to find the min and max polyline elevation in selected areas. I can't figure out how to extract just the elevations of my selected polylines so I can quickly see the elevation values?
View 9 Replies
View Related
Oct 31, 2013
I am unsure why my Lisp does not work.
(DEFUN C:Clear_values (/ GLBLS) (SETQGLBLS '(*DATEDRAWN* *DRAFTNAME* *JOBNUMBER* *OWNERNAME**JOBCOE* *PERMITREVDATE* *PERMITCONTACT* *HOMEBUILDER**SUBDIVISION* *ADDRESS**CITY* *STATE* *ZIP* *LOT#**PARCEL#* *NSCOORD* *EWCOORD* *STANDARDDETAIL#**SUPERNAME* *SALESMAN**GATECODE* *HOMEPHONE* *WORKPHONE* *ALTPHONE1**ALTPHONE2* *EMAIL1* *EMAIL2* *ACCESS**EXCAVATIONTYP* *EXCATDEMO1**EXCATDEMO2* *SKIMRUN* *AWLRUN*
[code]....
I've tried several options such as (mapcar 'set GLBLS "%%") but nothing happens, and with the above code nothing happens; the code only returns nil.
View 8 Replies
View Related
Feb 7, 2012
I use the following code to assign a reactor to an object.
Now I noticed that if I close the dwg file after you successfully saved, when I open even if I load the lisp, the reactor does not work.
Another problem: when I use the command "erase" or "explode" the reactor is started twice, why? you can run it at once?
(setq marReactor (vlr-object-reactor (list (vlax-ename->vla-object oggmar)) "TEST" '( (:vlr-erased . reactor_upd) (:vlr-modified . reactor_upd) ) ))
View 3 Replies
View Related
Feb 7, 2013
Is there a way or a lisp to scale multiple 3d polylines, at same time, and the base point is the start point of each one?
View 4 Replies
View Related
Jul 15, 2013
I've been looking to download a lisp that can trim (TR) and the (PE, join) polylines. two at a time or multiple... I've tried writing the lisp routine but I cannot do it correctly.. Any good lisp routine? Also, if there's one to trim & fillet w/a radius.. Hopefully there's two different routines but if there's one then even better...
View 6 Replies
View Related
Sep 9, 2011
Lisp (or a native way) to lengthen multiple polylines or lines at once to the same length by entering that length? I found the following lisp routine which extends a line an entered amount, but it has to be on a specific layer, and I want to enter the finished length, not how much to extend it.
(defun c:blen (/ lSet tmp doMode objLst actDoc)
;; *lDel global variable remembered during session
(or *lDel (setq *lDel 2.0)) ; default value
(princ "
>>> Select lines to extend/reduce <<< ")
(if (setq lSet
[code].........
View 3 Replies
View Related
Dec 12, 2011
I need to be able to convert "polylines" (as opposed to "2d polylines") to 3d polylines. Here is the issue: the polylines that I want to convert have object data attached to them and they are at the proper Z elevation. When I use the "Convert 2d to 3d polyline" function, the conversion does take place, but all of my object data is removed from the object. And since one of my attributes reflects the overall elevation of the object (which all of the verticies will be the same elevation - even though it will be a 3d polyline), there are too many objects to individually update the attribute information when I am pressed for time.I am working in Civil 3d 2010. Any way to do this using Civil 3d?
View 8 Replies
View Related
Sep 16, 2013
I'm trying to set up a height label for sections and elevations. I then want to update it with a shortcut.
I already tried it with a field that shows me the y coordinates, but it won't show me the "+-"0.00 sign,when I put it to zero level. It only writes "0.00".
View 9 Replies
View Related
Jun 17, 2012
I need to wright a routine in autolisp that selects all 3Dpolylines with the same vertex Z value.Qselect as no transparent mode and filter doesn't work.
View 7 Replies
View Related
Jul 30, 2012
where I can obtain a freeware lisp routine that lists the lengths of all the polylines on a specific layer or within a selection set? I want to avoid list if possible as there are rather a lot of polylines!
View 2 Replies
View Related
Jan 4, 2012
I have a series of boxes or polygones that I would like the program to find the 1/2 distance and create two seperate polylines from the one object.
Example:
I have a square with pt1,pt2, pt3 and pt4 respectively. After I have ran the program it would create a diagonal from pt1 to pt3 and join the rest of the lines now to create the one polyline. Also it would do the same to create another exact polygonal shape for the other half. Thus creating two shapes of equal value from one.
View 9 Replies
View Related
Oct 17, 2011
Essentially, I'll be creating a sort of Venn diagram. So for the purposes of this exercise, let's assume it's the classic Venn diagram of three intersecting circles. But I need this to work with closed polylines, that may also have arc segments in them.
Anyway, so I have these intersecting areas, and I need to create bounding polylines for each area, and assess the number of overlaps. So, as in a Venn diagram, the areas where only one circle is present can then get shaded one color, areas where two circles are overlapping can get a different color, and the area where all three circles overlap can get a third color.
I'm clearly going to have to be converting the various boundaries to Regions, and performing some Unions. It seems I could grab all objects, convert them to Regions 2 at a time, and compare their Union'ed area to their individual area, to determine if they overlapped at all. With only the 3 cirlces, that would work, but when I have 35 individual polyline areas with arcs, suddenly this method feels like it will break down.
View 7 Replies
View Related
Feb 26, 2010
I work with polylines a lot to maintain Facility Space and I come across polylines that are overlapping. Is it possible to have a routine to find polylines that are overlapping? Sometimes I really have to zoom in pretty close to see if they are overlapping and sometimes it's pretty obvious.
View 9 Replies
View Related
May 20, 2013
There is a AutoLISP for extract START and END coordinates in X, Y, and Z planes, and extract length of Polylines and Arcs.?
View 7 Replies
View Related
Mar 5, 2013
I have few co-ordinates in notepad like mentioned below. How can i create polyline using read-line function in auto lisp.
x y
0.0,0.0
2.0,0.0
2.0,1.0
0.0,1.0
2.0,0.0
4.0,0.0
4.0,1.0
2.0,1.0
View 2 Replies
View Related
Apr 1, 2013
(defun layun (target_obj / original_layer original_layer_info target_obj_atts new_layer )(setqoriginal_layer (cdr (assoc 8 (entget target_obj)))original_layer_info (tblsearch "layer" original_layer)target_obj_atts (entget target_obj));setq(if (or(wcmatch original_layer "*-P123"); REMOVES 4 CHARACTERS(wcmatch original_layer "*-P123456"); REMOVES 7 CHARACTERS(wcmatch original_layer "*-P123456789"); REMOVES 10 CHARACTERS );or(progn(setq new_layer (substr original_layer 1 (- (strlen original_layer) ??))) ; NEED TO ASSIGN VARIABLE TO MATCH THE NUMBER OF CHARACTERS TO REMOVE(if (not (tblsearch "layer" new_layer))(progn(entmake ;;;begin to make new layer(list'(0 . "LAYER")'(100 . "AcDbSymbolTableRecord")'(100 . "AcDbLayerTableRecord")(cons 2 new_layer) ;;; layer name(assoc 6 original_layer_info) ;;;re-use original linetype'(70 . 0) ;;;flags - use default flags(assoc 62 original_layer_info) ;;;re-use original color);list);entmake);progn);if(entmod (subst (cons 8 new_layer) (assoc 8 target_obj_atts) target_obj_atts)));progn);if);defun
assign a character where ? is shown so that it matches with the number of characters to remove based on the 3 lines above (see wcmatch lines). At present, whatever number I replace that ?? with, it removes that number of characters from the layer that I selected (if it meets that WCMATCH criteria). Another option which may be more difficult is to be able to have the routine look at the object layer and if it contains -N- or -D- or -NEW- or -DEMO- then to remove all the characters that follow these layer modifiers. This way I can cleanly add another project modifier behind these modifers.
View 9 Replies
View Related
Aug 1, 2012
I need to be able to grab all polylines and change global width at once. This is a repetitve task that i have created a button for. I am trying to use this but it is not working. It gets hung up on me wanting to manually select the polylines when i thought i grabbed them with the first line.
(ssget "X" '((8 . "LayerName")))
(command "PEDIT" "w" "9")
View 6 Replies
View Related
Feb 10, 2012
I need a function that allows to convert the polylines selected with a width globalize defined in a double closed line (spaced by the same width of the polyline), with a hatch inserted automatically defined.
Brilliant idea to draw raceways quickly: instead of making handmade double lines, connect, enter the hatches all by hand, you could quickly draw the polyline with width identical to the size of the duct, and then the lisp transform it into a duct more aesthetically pleasing if compared to the full polyline!
View 9 Replies
View Related
Mar 21, 2013
I need to segregate closed polylines in my drawing by area range. Ideally, I would input the number of ranges I need.
Then somehow find the smallest and largest pline area to determine the range values (rounding up to a sensble number)
Then with the ranges determined the polylines would be segregated and moved to new layers.
I've been trying to hobble together pieces but with no joy.
View 9 Replies
View Related
Apr 9, 2012
Looking for Lisp command to show (read/assign variables) to normal or custom properties in an object?
View 7 Replies
View Related
Jul 12, 2012
Is there a lisp that will allow me to do a continuous dimension, but will alternate the dimension position from low, high, low and high? If there is no lisp already created, how to create one?
See Continuous dimension attachment for example.
I work at a glass and glazing company and this is how we dimension mullion width and DLO. See typical window dimensioning attachment for window elevation with dimensions.
View 6 Replies
View Related
Nov 14, 2013
I have a list ("temp.dwg" "temp2.dwg") and would like to add the string "insert text here" into each item in the list resulting in ("insert text heretemp.dwg" "insert textheretemp2.dwg"). how would i go about doing that using LISP?
View 2 Replies
View Related
Oct 7, 2013
Is there a way to programatically set a visual style before a drawing actually opens?
We have some huge models and people seem to forget to change their visual styles back to 2D wireframe before saving and exiting drawings. Some models will crash on some workstations when trying to open in a rendered mode.
I found a lisp with a function that looked to set viewport visual styles. But it does not seem to be supported anymore. --> (vla-put-VisualStyle vport 1)
View 9 Replies
View Related
Oct 11, 2012
I'm trying to write a lisp routine that, when I invoke the mleader command, osmode is set to "nearest" & orthomode is set off. I then would like the original settings to be returned.
attached is what I have written so far:-
View 4 Replies
View Related
Jun 20, 2013
Lisp that switches back on Selection Preview i.e. thickens and highlights lines when you hover over them?I don't know why, but they are always unticking the boxes.
View 4 Replies
View Related
Sep 13, 2013
Given a feature line/polyline(FL/PL) and a series of points directly on the FL/PL, how can you assign the elevations of the points to the vertices of the FL/PL?
Without using a surface?
View 9 Replies
View Related
Feb 27, 2012
Is it possible to assign a global width to polylines by layer?
I have made changes to one dwg and i now have to apply it to a bazillion more DWG's. But the chnages apply only to a few layers. So i was wondering if i can set the global width to these polylines by layer somehow to save me from doing it "manually"
View 2 Replies
View Related
Sep 7, 2012
Is it possible to execute a certain command based on multiple selections withinin a dcl? for example: two radio colums, one with selections A and B, and a second with selections 1 and 2. is it possible to program commands based on user selections from each column? ex: if A and 1- do a command. A 2- do a different command, etc...
I tried :
(action_tile "key1" "(setq A t")
(action_tile "key2" "(setq B t")
(action_tile "key3" "(setq 1 t)(done_dialog)")
(action_tile "key4" "(setq 2 t)(done_dialog)")
(if
(and (a) (1)
)
(command ...
but was unsuccessful. no matter which combination was selected, the command under all combinations would run.
View 2 Replies
View Related
Jun 3, 2013
I am trying to find a lisp that would get an attribute value (tag name = NBR_5) . I'm trying to run a simple routine that would let the user place the value from the titleblock attribute as text on a drawing. I see a ton of articles regarding getting attributes but I am not well versed in programming.
View 9 Replies
View Related
Jun 22, 2012
I have a routine that work fine, but I receive a nil at the end of command. How to fix that?
View 7 Replies
View Related