AutoCAD Visual LISP / AutoLISP :: Place Object On Demo Layer
Jul 20, 2011
I want to create a routine that will place selected objects on a the corresponding demo layer. Here is the outline:
enter command
select object
extract layer name of object (i.e. "CS CURB")
if demo layer exists (i.e. "CS CURB CD")
>put object on demo layer
>else create demo layer, and place object on layer
I could select multiple objects on different layers.is this possible with lisp? any good starting point for lisp programing?
View 9 Replies
ADVERTISEMENT
Nov 11, 2013
This is in regards to the LIP command in Toolpac. The layer properties for a selected nested object (LIP) used to default to nested. Now you have to select nested from the list of options. Why they would change LIP. My whole company had gotten so used to it.
View 4 Replies
View Related
Apr 17, 2012
lisp..It work fine but just that i need some minor modificatio to it...At moment, when i activate the lisp, it will automatic select all dimension,leader and multileader to a layer call "DIMENSION"...Anyway i wonder if it is possible to prevent any dimension,leader or multileader in layer "Section" will not be change to layer "Dimension"?
View 2 Replies
View Related
Sep 24, 2013
I want to change all pline in drawing to a specific object color (color 253). My code is not working & my brain is not functionning properly today...
(DEFUN C:TR() (SETQ ALL_PLINE_IN_DRAWING (ssget "_X" '((0 . "LWPOLYLINE")))number_of_pline_in_dwg (sslength ALL_PLINE_IN_DRAWING)entity (ssname ALL_PLINE_IN_DRAWING 1)data (entget entity)new_LAYER (list(cons 62 253))data (append new_LAYER data))(entmod data));END OF DEFUN
View 8 Replies
View Related
Aug 25, 2005
Is there a tool out there that will allow me to pick an object and change it's layer properties?
View 9 Replies
View Related
Mar 27, 2010
I want a lisp to change all object colours from bylayer to its color Example (if layer doors its color is blue the color of objects drawn in this layer will by blue not bylayer)
View 9 Replies
View Related
Nov 13, 2012
I have a lisp file that reads in a point list from a text file and creates a number with a circle around it for every point, then a line from one circle to the next in line with the center point of each circle. Is there a simple way of making the lines "go behind the circles". The portion of code that creates the circles, lines and text is as follows and a cutout screen dump of what it looks like is below.
(setq amount 0)
(foreach item lines
;;; ;;
;;; Create the text ;;
;;; ;;
(setq x (+ (atof (nth 2 item)) (car pt_origin)))
(setq y (+ (atof (nth 3 item)) (cadr pt_origin)))
[Code]....
IV 2010
View 9 Replies
View Related
Feb 6, 2006
Have Lisp to place aligned dimensions on each segment of a polyline?
I would use it for reinforcing bar detailing.
View 9 Replies
View Related
Jan 13, 2013
Lisp routine that divided up a normal square / rectangle room and insert a block at each given point.
At present if the room was to have four lights width ways and three lights length ways we would divide the width by eight to give us 1/2 1 1 1/2 so the lights would be placed on every second point after the divde command (dividing the room by twice the amound of lights needed).
View 9 Replies
View Related
Jan 7, 2014
I would like to create a command that will copy a file from one place to another.
I can do it directly from the commandline like this
But when I try and put it in a command macro in the CUI editor like this
^C^C_shell;copy "c:/temp/drawing1.dwg" "g:/temp";
it does not seem to work. It comes up with this on the commandline
but no copy of the file is made.
How can I get this to work without having to write an external file, such as a script or lisp?
View 1 Replies
View Related
Oct 24, 2013
LSP file i downlaoded from web.it is to use for Area with (m2) and room name. by click polyline.
i want to modify it to use without adding Room Name, just insert area to the drawing.
(defun drtxt (/ rn tx ls vl lt ht lb hb nr pt)
(setq tx (strcat "Area: "
(rtos (/ (getvar "area") 1000000) 2 2)
" m2"
)
rn (getstring "
Room Name: ")
[code]....
View 5 Replies
View Related
Mar 11, 2013
You have a dwg with multiple sets of different blocks and a circle you want to place on the insert point of each set blocks.
You select the circle then select one of the blocks in the set and the circle is placed on the insert point of each of the blocks in that set. It would save time from doing it manually and save on mistakes.
View 9 Replies
View Related
Aug 29, 2011
I have a rather simple 3rd party custom object... I tried to get its bounding box but the coordinates that come back don't seem to relate at all to the object.
What I'd like are the coordinates of two nodes the object contains...
Is it possible to apply the autocad cursor in some why with the node object snap to get their coordinates?
View 4 Replies
View Related
Mar 26, 2012
Does any Lisp routine available to batch replace all the closed polylines with an existing block?
View 9 Replies
View Related
Jun 20, 2012
Say I have 2 items, one is on layer "M-Duct" and the other on "M-Pipe" (they are in the same drawing). Any lisp routine that would create the layers "M-Duct-New" and "M-Pipe-New" (based on the same color and LT as the original layers) and then move those objects to the newly created layers?
View 9 Replies
View Related
Feb 21, 2013
Possible to link an xref layer and local layer so they display the same (eg. sync viewport colour, linewieght, line type)?
I insert xref's for my base drawing but legend is on local layers and I would like to be able to ensure that the line colour and linetype always match...
View 4 Replies
View Related
Aug 28, 2012
I have a customized button to draw an ‘ac-arrow’. I created a lisp to create the layer “G-ANNO-LEDR”
if the layer name is not found. The advanced part I would like is:
Current layer: E-ANNO-WIRE
Ac-Arrow Leader: G-ANNO-LEDR
OPTION 1:
If, say I am on current layer “E-ANNO-WIRE” and need to draw my “ac-arrow” leader, and continue working
on the original layer “E-ANN-WIRE” (and have the leader be drawn [remain] on the layer “G-ANNO-WIRE”).
With this option, I have the block “ac-arrow” imbedded in my template drawing file to have the block at hand.
With this option, the layer “G-ANNO-LEDR” will be created IF it is not on the drawing.
OPTION 2:
- Currently be on layer “E-ANNO-WIRE”
- Bring in the block “ac-arrow” from my block library “L:AutoCADSymbols”
- Draw the “ac-arrow” leader which will be on layer “G-ANNO-LEDR” (this layer created IF it is not
on the current drawing).
- After the leader is drawn’
- Be put back to the layer I was, “E-ANNO-WIRE”, and continue working.
The OPTION 2 is what I would really like to have. A while back, I happen to see one like OPTION 2, but I cannot
find it anymore on the users groups. I have been searching for a while now.
Currently, I use the button in my customized toolbar (see image) and have to have the “ac-arrow” block in my drawing and have its layer created in the drawing.
View 1 Replies
View Related
May 31, 2012
I'd like to have/write a lisp to change all objects on layer "0" to layer "PC - Module"
If possible also;
save the document close the document open next in directory run layer changer program again.
View 8 Replies
View Related
Nov 19, 2013
Any script that when ran will set lineweights of a layer based on what color the layer is assigned. For instance if I have 3 lines that are green on 3 different layers. I need the script to change all 3 layers lineweight to .015mm. I have drawings that are inconsistant with layer names so layer translator and methods of that nature will not work because I do not know all the layer names and I have 100 drawings to do this to.
View 3 Replies
View Related
Feb 21, 2013
I need to get VLA-Object from block name.
here there is a code to get block name from VLA-Object:
(vlax-get-property obj (if (vlax-property-available-p obj 'EffectiveName) 'EffectiveName 'Name) )
but I need the inverse of this code exactly:
blockname(as a string)==>VLA-object
(defun GetVLA_BName (BName).......
so, how can I do it?
View 9 Replies
View Related
Mar 15, 2013
I am trying to write a simple (or at least I thought it was) code to flatten a 3d object into a 2d shape. For some reason after ACAD runs the lisp it recognizes the flatten command but it will not select all. this is what I have:
(defun c:fl () (command "flatten" "all") )
I have even tried the pick first command, to select all then run the flatten command but that still doesn't work.
View 5 Replies
View Related
Jun 19, 2013
How to access the information stored with an AcDbScale object using Visual Lisp. I can convert the vla-object to an ename and then use association codes to extract the data, but surely there's an easier, more direct alternative.
View 9 Replies
View Related
Jun 24, 2012
How to fade an object (block) in and out?
View 2 Replies
View Related
Dec 9, 2011
i am trying to add a reactor to ddatte command, would like to know which object was being edited, the ename or object name (ssget "P") does not seem to be the one
View 5 Replies
View Related
Nov 10, 2011
I am looking for a lisp routine which will allow me to mirror an object that I pick automatically. I don't want to have to pick the two points to set the mirror line. I just want the point I pick on of the object I select to be the point of the mirror. If that can't happen, I was wondering if the object could mirror at its insertion point (like if it were a block or a text.
View 7 Replies
View Related
Nov 1, 2011
We use multi-leader objects in our drawings. When the multi-leader and its value are to be replicated throughout the drawing, we create mleaders with fields that show the contents of the first mleader. That way we can update only the value in the first mleader and all of its children will update as well. It works nicely for us.
Here comes one snag. If one of us opens a drawing with which we are not intimately familiar, we don't know which mleader is the parent of which children. There might be fifty parents and four hundred children in a drawing so going through them by hand is a big productivity drain.
What I need to do is write a routine that will let the user select the mleader that includes the field and have the routine highlight and/or zoom to the parent object.
I thought I should be able to find that info in the dxf codes for the mleader, but I am either missing it or it's not there.
View 3 Replies
View Related
Nov 12, 2013
I am creating a line using entmake, but I need the start and end point to be variable that was already defined ex.
(entmake '((0 . "LINE")(8 . "FIELD") (10 . line_insert) (11 line_end)))
Command: !line_insert
(29.2813 20.5 0.0)
Command: !line_end
(29.2813 18.5 0.0)
The error I get is
; error: bad DXF group: (10 LINE_INSERT)
What do I do to make it recognize this variable?
View 1 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
Jun 14, 2013
I have this lisp which will display the height of a 3D object to 2 dps. What I need is for 3dps to be displayed but I have no real understanding of LISP coidng so I can't work out where this is specified in the routine.
Why this LISP does not work when I try to use it in a drawing which has a Pointools POD file working (or previously had one) within it?
View 5 Replies
View Related
Feb 7, 2010
How can I get the layer that an entity is on. I have tried numerous method but they don't seen to be retrieving the layer information.
View 8 Replies
View Related
Aug 29, 2013
I am trying to improve quality of exported drawings from Revit. We had troubles with lines and setting „by layer“. We found solution, but unfortunately we have to do it manually for each drawing.
how to program (by using LISP for instance) following commands?
Start Layer Translator (command „laytrans“)In Layer Translator, load the same drawing in section „Translate To“In Settings check only „force object colour to ByLayer“ and „Translate objects in blocks“Click on „map same“Click on „translate“Done
View 1 Replies
View Related