AutoCAD Visual LISP / AutoLISP :: Dimension Color By Layer
Oct 20, 2011
As a consultant we grey out architectural backgrounds for our sheets. We use the SetByLayer command to change the color of the objects in our sheets to gery out. The issue is with dimsensions. Dimension Line Color, Extension Line Color, and Text Color are all set at By Block as default and no one ever bothers to change it unless they are setting it to a specific color which is even more of a problem for us. You can edit the properties of an existing dimension and set Dim Line Color, Ext Line Color, and Text Color to by layer, I am looking for a way to automate this. Something that can search through a drawing, grab all the dimensions (even in blocks) and set everything by layer.
View 9 Replies
ADVERTISEMENT
Aug 22, 2011
if my attach lisp can add sort of counter that how many dimensions, leader and multileaders have been move to layer "dimension"...
View 9 Replies
View Related
Oct 28, 2013
I would like to set dimension text fill color to "background" instead of, you know, dimensioning my drawings properly.
I have this code I got on these forums and it works well except for the 'TextFillColor' variable. I can't find the correct color number or syntax for "Background'. It's currently set to 0 which produces ByBlock, and any number I put in there corresponds to the AutoCAD color number (1 = Red, 2 = Yellow, etc.)
If you have a better routine that you could post that works for me too. Or maybe you could just do my work for me? Even better.
(defun c:test (/ obj num cnt)
(vl-load-com)
(setq ss1 (ssget '((0 . "Dimension")))
num (sslength ss1)
cnt 0)
[Code]...
View 5 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
Aug 28, 2011
I am interested in a program that can select layers by its color, and then change those layers to a different color and add a prefix of Z- in front of those layers.
Example:
Layer Names: Layer Color: New Layer Names: New Layer Color:
Wall 2 Z-Wall 100
Berm 2 Z-Berm 100
Fence 2 Z-Fence 100
I found a program (below) that works pretty close to what I am looking for but not quite.
;;; Change the color of a layer to another color by Jeff Mishler July 9, 2003
;;; Usage - (lay_col_chg oldcolor newcolor
;;; example: Command: (lay_col_chg 142 100)
[code]...
View 7 Replies
View Related
Aug 14, 2009
I'm looking for a lisp that will change all the layer colors of selected xref by clicking the xref and select color from the color table palette. I have a routine that would change the layer color of a selected entity other than xref.
;;Changes selected object layer to a true color
;;of chose from a dialog
box
(defun c:cvc (/ ent ent_data rgb str objlay)
(setq ent
(entsel)
)
[code]....
View 5 Replies
View Related
May 21, 2003
I am looking for a lisp routine to search the layer table to find a particular layer color and change color.
View 9 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
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
Jan 24, 2012
I have a library that has a primary folder with 11 subfolders. If the LISP can go through all the subfolders, that would be great. But, if it cannot, I can work with going into each subfolder and running the routine. There are over 12,000 files and I don't have the time to open each one and change the color.
Here's what I need the LISP to do:
open the drawing
select everything
change the color to "bylayer"
save
close
open next drawing in folder and repeat
Once it gets to the end of the folder it can stop.
View 9 Replies
View Related
Aug 1, 2013
I'm attempting to create an easier way to change layer colors of nested linework by selecting the linework and having the ACAD index color dialog box appear to select the replacement color.
defining the "ic" variable;
(defun c:clc (/ ent ent_data ic ent_lay) ;change layer color(setq ent(nentsel)) (setq ent_data(entget(car ent)))(setq ic ;index color(cdr(assoc 62(ACAD_COLORDLG))))(setq ent_lay(cdr(assoc 8 ent_data)))(command "-layer" "c" ic ent_lay ""))
View 3 Replies
View Related
Sep 3, 2013
I have too many blocks with specific layers inside.
develope lisp can change all to layer 0 but keep color and linetype as it is.
I will use this as a part of script to change multiple block.
View 9 Replies
View Related
Sep 19, 2013
I'd like to change a layer's color from command line because of a user icon. I figured out from previous topics that I should use macro similar to this: ^C^C_filedia;0;-la;s;Verdeckt (ISO);c;1;l;dashed;;_filedia;1;re;
(I want to use this macro to change layer's linetype, too, but that's not the point)
The only problem with this macro: layer's name contains a space therefore Autocad tries to recognize Verdeckt as a command (and macro interrupts there) instead of setting Verdeckt (ISO) as the current layer. I've tried using different quote marks, none of them worked (' and " and <>). I hope there's a method for entering a parameter that contains space.
Software: Inventor Series 2011 SP1 x64
OS: Vista Business x64
CPU: E6400
RAM: 2*2Gb GeIL
VGA: Quadro FX 550
View 5 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
Jun 11, 2002
I am wondering how I can override a dimension value through AutoLISP. Is there a command line that I can use so that the pop up window won't show up?
View 7 Replies
View Related
Oct 15, 2012
I want to override the measurement in a dimension with a string of text using a LISP command.
E.g.. "select dimension"
type new text for dimension
replace dimension measurement with new text. I can get the entity and its values, buy not sure which value to change for the "text override".
BTW Acad 2012.
View 3 Replies
View Related
Apr 17, 2013
how I would go about writing a function that would calculate the length of a diagonal of a rectangle using SQRT function? I've been trying but so far nothing!
View 4 Replies
View Related
Apr 10, 2012
I have the following code, that for some reason the last created dimension is no being selected. That's the first problem. The second (and not as improtant) problem( becasue it does work), is that I'm using the "dimedit" command. I prefer to do a swap within the dxf codes, that I treid but didn't work, so I resorted to the "dimedit" command.
(command "DIMLINEAR" pause pause pause)
(setq last_dim (entsel (entlast)))
(setq oldunits (getvar "lunits")) (setq oldprec (getvar "luprec"))
[Code].....
View 4 Replies
View Related
Aug 13, 2012
Is there any way to change the colors of the dimensions styles, including dimension lines, extension lines and text to "by layer"
I found a code to change the colors, but only affects the current dimensions in the drawing and the styles do not change.
View 3 Replies
View Related
Jul 14, 2012
I'm writing function which will facilitate user to offset dimension. After enter command, he select dimension and select point near one of dimension's arrowheads. Then I'm calculating new XLinePoint1 or XLinePoint2 and replacing original.
I have everything done. I thought ... The problem is when user firstly create AlignedDimension and after that he create RotatedDimension by using continous function. After that XLinePoint1 and XLinePoint2 are not parallel to the DimLinePoint (look at image).
How can I get coordinates of points selected in red rectangles?
I know that one is specified as "dimension line defining point" but what about second? How can I get its coordinates? Or maybe there is other way to get this point?
View 6 Replies
View Related
Nov 1, 2011
Looking to make a selection set of points that are on a specific layer, and then create a dimension between, in this case, two points. I feel like it should be very simple, but I can't get it to work for the life of me. Here is the test code I've been playing around with:
(defun c:test (/ sel1 TC)
(setq sel1 (ssget "X" '((8 . "VPOINTS"))))
(setq TC (polar (entget (assoc 10 (ssname sel1 0))) (dtr 180.0) 9))
(command "DIMLINEAR" (entget (assoc 10 (ssname sel1 0))) (entget (assoc 10 (ssname sel1 1))) "V" (polar TC (dtr 180.0) 9) "")
[code].......
View 1 Replies
View Related
Nov 8, 2013
I am trying to create a lisp routine, that will check the dimension style "standard" to see if its annotative. If it is, I need it to turn annotative to off.
ITO - Application Management
Factory Design Suite Ultimate 2012
AutoCAD 2012 | Inventor Professional 2012 | Vault Professional 2012
View 2 Replies
View Related
May 17, 2013
I there any way to set the dimension break size in autolisp ?
View 1 Replies
View Related
Sep 23, 2011
My goal is to be able to select a line and a dimension and then have the line's length appear as the text override for the dimension. I have the code to substitute the variable "dist" for the dimension text:
(setq dimselected (entsel "
Select Dimension:"))
(setq newlength dist)
(command "dimedit" "n" newlength dimselected "")
but am having problems extracting the line's length to the variable and setting setting it equal to the variable. To make things more interesting, the value needs to be in inches with fractional inches accurate to 1/16".
View 6 Replies
View Related
Aug 16, 2012
I'm dimensioning an old drawing with the real (measured) dimensions and with the drawing dimensions in brackets (using ' 1500 (<>)' to give '1500 (1505)' for example.
What I'd like is to also be able to put on the difference between the length I type in and the length in brackets - as this would let me see any really glaring errors that can't be attributed to user-error on the laser measure.So I could type in '1500 (<>) (X)' where X is the formula, and get ' 1500 (1505) (5)' back?
How to be able to run a script that could highlight any dimensions where the number is brackets and the typed number have a a difference of, say, 50.Or failing that, any way to extract all the dimension text at the end into excel so I can see the differences myself?
View 1 Replies
View Related
Dec 7, 2012
Found this routine online and am hoping to modify it to my needs, just not sure how to proceed.
It exports the text out of the dims into an excel file, the issue I have is that it automatically opens a new book every time you run the lisp with the original workbook open.
I am trying to get it to automatically insert the next set of numbers on the row below the first pull.
View 9 Replies
View Related
Aug 8, 2013
Currently, when I do drawings, I give my machinists drawings with each point, and they program their machines. To do that, they calculate the round part diameters, which is basically 5" - 2x<Dim>.
I'd like it if I could give them drawings with the real number, and in parenthesis next to it, 5-2x<Dim>.
I've attached a jpg of what I normally give them and how I'd like it to look. Is this something do-able via a macro or something?
View 6 Replies
View Related
Mar 8, 2013
Is there a command or a lisp that will automatically dimension each side of a closed polyline at once? See attachment for image.
View 1 Replies
View Related
Sep 20, 2012
How to write an AUTOLisp program to label building dimensions. With Civil3d 2013 preventing me from labeling multiple lines at once, creating building labels to dimension complex building exteriors is much more complicated than it needs to be. Lisp Routine that Generates a MText or Dtext dimension centered on a line and offset to be clear of the line. the layer for this piece of text would always be "DIMS-BLDG" and the text style will always be "L50s."
the text doesn't have to be organized as it is in this example. the main focus is the layer being correct with the foot mark, precision set to xx.x and oriented to the line.
View 4 Replies
View Related
Sep 9, 2013
Sometimes someone dimensions a floor plan and starts one direction and then "goes back " the other way over the top of the dimension they just placed, which causes the dimension lines to overlap, which in turn shows incorrect distances when viewing on paper. Any lisp routine that can alert you to the fact that there are overlapping dimension lines (not the extension lines) in a drawing by changing them to color White or something? I have pasted a routine that we use which changes all dimenions with "modified text" to color white. That way I can see if someone just typed in the dimension distance they wanted instead of what was actually there.
(defun c:dc (/ dim_length)
(setq ssmod (ssget "X" (list (cons 0 "Dimension")(cons 1 "~"))))
(if ssmod
(progn
(setq dim_length (sslength ssmod))
(command "Change" ssmod "" "P" "C" "w" "")
[Code] ......
View 9 Replies
View Related
Feb 13, 2013
I want to doubleclick on a dimension and have the DIMRND override appear
I can't figure out what command I need to customize the doublclick CUI
View 4 Replies
View Related