AutoCAD Visual LISP / AutoLISP :: Changing Layer Settings From A Sheet Set Entry
Sep 26, 2013
for my latest little project I'm trying to change layer settings depending on a entry in a sheet set attribute.
Basically, if the sheet set custom attribute entry is 'white' I want the colour of a specific layer displayed as 255,255,255, and if it's blue I want it changed to 0,0,255. So I can control the colours from a sheet set custom properties level.
And for it to check if the layer existing in the drawing, so it'll skip the process if it's not there.
View 7 Replies
ADVERTISEMENT
Mar 29, 2012
i have this LISP as attach...at moment it works like this as below:-
1) Activate the LISP
2) Automatic select all the preset block name in the lisp and change to a pre-set layer
3) LISP end
Now i wish it to be like this:-
1) Activate the LISP
2) Automatic select all the preset block name in the lisp and change to a pre-set layer
3) At command prompt, will state out " n block have been change to layer Eye Bolt"
4) LISP end
View 1 Replies
View Related
Oct 5, 2012
How to edit the string below so that it will ignore all layer names starting with "E-". I want to change all XREF layers in the current dwg. to 161 but ignore all XREFED layer names that start with E- such as E-lighting, E-power etc.
View 4 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
Aug 15, 2011
How can I determine what was selected in the pop-up box and then using that for 1 of 2 things, either 1) Turn off the Edit Box for Hole Spacing if the selected option is 1(which would be value = "0" of the popup list) or 2) Making the portion where it confirms that the Hole Spacing Edit Box is filled out so that if the Pop-up List displays 1, it doesn't check the Hole Spacing Box. Below is the DCL and LISP that I'm currently using.
Here is my current DCL:
questions :dialog {label = "Information for Program";: row {: column {: boxed_radio_row {key = "Galv";label = "Galv Slot Required?";: radio_button {key = "Y"; label = "Yes"; value = "1";}: radio_button {key = "N"; label = "No";}}: boxed_radio_row {key = "Bevel";label = "Is Leg to Face
[Code].....
If needed: AutoCAD 2013 User using Visual LISP for editing LISP and DCL files Also I have AutoCAD 2011 currently still available for us, but we are using AutoCAD 2013 for 99.9% of AutoCAD use
View 6 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
Sep 5, 2012
i need any lisp that perform the Lengthen command from both side of Polyline by Digits Entry.
View 7 Replies
View Related
Nov 13, 2013
presuming I have a selection set of different entities, that might have different linewight.
The code that is responsible for this property is 370
370Lineweight enum value. Stored and moved around as a 16-bit integer.not omitted from here
I need to make all of the entities have the same layer, and to make sure the each entity has the "ByLayer" lineweight.
The problem that I encountered, is the lineweight changement.
This is the colution that I came with, but it doesn't work for me:
(defun c:test () (setq en (car (entsel))) (setq el (entget en)) (setq el1 '()) (setq indx -1) (repeat (length el) (setq indx (1+ indx)) (if (/= (nth indx el) (assoc 370 el)) (setq el1 (cons (nth indx el) el1)) ) ) (setq el el1) (entmod el) (princ) )
Having tested it in different ways, it looks like at the end, el1 represents the association list that I want my object to have, but it doesn't want to update.
View 9 Replies
View Related
Aug 26, 2013
I have been searching all over and have not found a method for limiting the number of digits/characters a user can enter for a getstring or getint prompt.
View 9 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
Jun 21, 2012
I have two attributes "REVN" and "REVD" in a block "ATT" that I would like to change (globally preferably) to the following.
(1) Existing text to keyboard entry text.
(2) Colour from existing to 10
I am a bit lost in the (command "-attdef" .......)
(defun c:atc ()
(setq rev (getstring "Please enter review"))
(setq dat (getstring "please enter date"))
(command "-attdef" .."ATT".."REVN"....."c" "10")..)
(command "-attdef" .."ATT".."REVD"....."c" "10")..)
)
View 4 Replies
View Related
Sep 23, 2011
I am using Autocad 2004 and can't upgrade.
I want to add the sheet set capability to Autocad 2004. I want to plot groups of drawings. It looks like the sheet set command of autocad 2005 would allow me to do this. But the command isn't available in 2004.
View 1 Replies
View Related
Aug 13, 2013
I'm trying to get an excel sheet to open and count cells based on the text inside a selected column then compare it to cad. The column says "red" or "green" and I want to compare it to a count of red and green hatches in cad.
I managed to get them to be counted in cad but I'm not sure how to get the excel part to work.
Note: I posted an earlier post thinking to count the actually color in the excel cells rather than the words but that ended up being quite complicated.
View 9 Replies
View Related
May 4, 2012
i just come across a lisp and i find it quite usefull,but then i wish to modify it abit. I have attach a sample of the lisp and jpeg to show what i require.basically all i need is the leader to be in multileader type. Is it possible? Additionally, can i set by default the coordinates to be shown in just 2 decimals?
View 9 Replies
View Related
Sep 21, 2006
The Field dialog box has an item for CurrentSheetNumber with field expression: %<AcSm Sheet.Number>%
Is it possible to create a Field to display the Next Sheet Number (CurrentSheetNumber + 1) and a Field to display the Previous Sheet Number (CurrentSheetNumber - 1)?
View 1 Replies
View Related
Jun 26, 2012
I'm trying to fix my profile via lisp-registry key. Why? Because the profile we use is part of a plug-in meaning we can do it using our profile so I alternatively the answer is to tweak the one supplied as part of the plug in.
The method I’m familiar with is to edit using the following code as example;
(vl-registry-write "HKEY_CLASSES_ROOT\.PEN\Shell\open\command" "" "notepad.exe %1")
However that’s for creating a new registry key entry the one I have already exists but needs to be modified, better yet the profiles name (*.arg file) can change with updates, so in my search I came across the following link.
[URL]
Now I cant put it together and am not sure where I have gone wrong…(See code bellow)
(vl-registry-write "hkcu "\Profiles\" (getvar 'cprofile) "\General\DefaultConfig" "\\DCMAR02\A03P20")
View 1 Replies
View Related
Jul 16, 2013
I have a routine that sets user defined osnaps based on a text file.Here is what is an example of user stored osnap settings -
(setq User_Osnaps (list (list "Alan" "endp,midp,int") (list "John" "cen,ins")))
Here is routine I use to set user osnaps -
(defun CU ()
(vl-cmdf "-OSNAP" (cdr (assoc (getvar "LOGINNAME") User_Osnaps)))
(princ)
)
This works great so long as the user is not in the middle of another lisp routine.How can I change this to a transparent command that will work to set osnaps while running another lisp routine?I would like to store it in a toolbar button.
View 9 Replies
View Related
Nov 26, 2012
We have a big issue where half our users can't open autocad. We have half running 2013 and half running 2006. For our 2013 users we've gone to our start menu and reset settings to default. and then just re-loaded our custom menus. How can I reset Autocad 2006 to default if I can't open Autocad?
We need to get people up and running.
View 3 Replies
View Related
Oct 1, 2012
How to edit this string so that it would change ONLY XREF layers in a dwg. to color 3 bylayer, and leave all of my additional layers in the current dwg. as is.
^C^Cchprop;(ssget"x");;color;bylayer;;-layer;color;3
View 2 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
Feb 8, 2013
Can you change the color of a block attribute with lisp like you can with the built in Enhanced Attribute Editor function eg
I can change the value of the attribute LAMP but can I also change its color from the color of the layer its created on?
(while (not (equal ck "SEQEND"))
(setq e1 (entnext e1)
e2 (entget e1)
ck (cdr (assoc 0 e2)))
(if (= (cdr (assoc 2 e2)) "LAMP")
(progn
(setq e2 (subst (cons 1 lamp)(assoc 1 e2)e2))
(entmod e2)
(entupd e1)
(setq ctr (+ ctr 1))
)
)
)
View 9 Replies
View Related
Sep 3, 2004
Is there a way to force a setting in a PC3 file?We have one set up to print rotated and sometimes for whatever reason it changes back to Auto for the rotation. It's under Graphics of the Custom Properties I would like to write something that if a person plots with this PC3 that to rotation will be forced to 90 degrees.
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
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 12, 2013
How do I tranfer all my standard autocad variable settings into a new version of Architecture? I have my dimensioning settings, etc set a certain way in my standard autocad and now I want to start using Architecture but need all my old settings.
View 9 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
Mar 20, 2013
Right now I have a few lines in the ACADDOC.lsp file to set up the plot stamp for all users. I would like to just turn on the plot stamp and auto load a custom .pss file that I have set up.
View 1 Replies
View Related
Jul 27, 2013
I need to create a command which could change a color of an allready existing selection set when activated. For example i have a command which creates a cube, where each specific group of lines were added to different selection sets. how can i recall any created selection set by its name and change its color?
View 9 Replies
View Related