I need to plot in a file some windows from a LISP, like (command "-plot"...
The windows are defined in a list of points like (((0 0 0)(10 10 0))...) defining lower-left and upper-right corners. Each .plt file must be saved with a different name.
Where else do they keep this setting? I only have found it in Active Layout in extended dada
(entget (vlax-vla-object->ename(vla-get-activelayout (vla-get-activedocument(vlax-get-acad-object)))) '("*")) The last pice of extended data is: ("PLOTTRANSPARENCY" (1071 . 0)) When i change it to 1 (setq layout(vla-get-activelayout (vla-get-activedocument(vlax-get-acad-object)))) (vla-getXdata layout "PLOTTRANSPARENCY" 'type 'data) (vlax-safearray-fill data '("PLOTTRANSPARENCY" 1)) (vla-setXdata layout type data)
it stays there (extended data), but the setting in Plot dialog box doesn't change!!! And it still prints no transparency.
It takes to save the drawing and reopen it again to see the change.
The command -PLOT does not have this setting as well, so my options back to VBA or Lisp, but HOW?
I am aware of the plot stamp available in the Plot Dialog box, however, we are looking at ways to imbed this info in the dwg. I currently have the WD_TB with an attribute for FULLFILENAME, an attribute for PLOT DATE, and an attribute for PLOT TIME12. So I get the information on the dwg. I would like to be able to run all these attributes as a string. I have tried FULLFILENAME|PLOT DATE|PLOT TIME12 with spaces, commas, ( ), " ", etc. and I do not know the proper syntax to get this to work. I have also tried (getenv "FULLFILENAME") or the getvar, in the title descriptions box.
Is it possible to open a dwg, change something and then plot a layout with visual lisp. This is my start. Opening is working, but plotting not. I have to switch between drawings before the function is going on. Sometimes it's plotting an empty sheet and otherwise an error: ERROR: Automation Error. Description was not provided.
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.
Is it possible to create a lisp that would change the plot style table? I don't know of any variable to type to change that. We convert drawings from Solid works to AutoCad and use the basic monochrome plot style. I'd like to easily change that since the act of doing that is repeated many times.
Goal: using the native windows explorer, Open the folder containing the the multitude of drawings from different vendors and customers, usually 30 -40 .dwg files.
Highlight all the files, Right click print.behind the scenes without any further clicking or involvement from the user autocad plots the extents of model space of all the drawings to a designated plotter fit to 11x17 sheets.
Is there a way to get model space to "display plot styles" through a lisp routine or a script?
i'm currently setting up a whole bunch of custom tool palettes for the company I work for and instead of the icons displaying in their actual colour (at the moment they're green, which doesn't show up very well on the light grey background), I'd rather they show in the plotstyle assigned to the individual dwg's.
call up the page setup manager (while in model space) and click modify, you can then check the radio button to "display plot styles" in the top-right corner. But when you have around 100 - 200 blocks to change, that process can be rather time consuming and cumbersome!
We used a block which contains deisel expressions for our plot stamp. When we publish through the sheet set manager it shows a temp folder where the drawings are spooled to instead of the actual drawing saved path. We can fix this buy turning off background plotting when we publish, but I was wondering if there is a way to show the saved path instead of the spoolled path when publishing in the background.
Below is the expression found in our plot stamp block.
but I have more than 150 dwg file and I should open all of dwgs one by one and setting ON/OFF for STAMP layer for every drawing and it takes so much time!
I just want to select files and LISP program set the STAMP layer to ON or OFF value.
I am running a simple script to color some layers in XRefs. I need to colour all layers in XRef files that don't have part of their name containing the characters NWP and I can do this with the line
-layer c 32 ~*|*NWP*
but then all the layers in the sheet file (not in Xrefs) also turn to 32 which I do not want. Is there some way to include an "except" statement in scripts.
I'm trying to set up an easy way to import layers from a certain dwt. file with a shortcut.
Now I found this code, which kind of works, but doesn't do the whole trick. It works with a Popup where I have to insert the dwt. file. It's also annoying that it opens this file than and I have to close it manually.
I would like to have this without any import options and automatically takes this one file always for the layers.
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.
What the require setting to enable me to lock of several layer continuously when i click the "LAYER OFF" button at the toolbar? I wish to set to be like whenever i use the "LAYER OFF" command, i can direct just continue to click several layers for it to be turn off.
I have an old routine that freezes layers that are off. I would like it to also turn off layers that are frozen. It took a while but I think I figured out how the old routine works. I was having trouble determining how the routine would know if a layer was off or not. I found if the color was a negative number that meant the layer was off (cond ((< (dxf 62 l) 0) (command "f" (dxf 2 l)))). How do I tell if the layer is frozen?
I was also wondering what the character was after the DXF code ie. (dxf 62 l). Is is a lowercase L or an upper case i and what function does it have?
Below is the old routine that freezes layers that are off.
I have the following code that works, most of the time. Actually, it works or completes itself all the time, but there is no "all encompassing" measures incorporated.
All of the reference entities, believe it or not, are on layer "0". There are also some consistent layers, that you can see in the code below. However, a user may create or even remove any layer in the reference drawing. Therefore in my current drawing, I may have layers that are not frozen in the xref.
Like i said, the following code works, but not all encompassing.
I found a lisp in an old post and I edited it alittle with my own layers to have it change to but when I use it, it doesn't deleted the extra layers. It says layer cannot be deleted. Below is part of the code that I am using, I didn't copy all of them since there are alot of layers in the lisp that I added. maybe I copied something wrong I am not sure.
I've inherited management of CAD standards. A third party developed the tool palette - mostly blocks, etc. but there are also icons to add whole series of layers to drawings. Click 'Architectural Layers' you add the architectural layers. Click 'Plumbing Layers' you add the plumbing layers. Since the original implementation, things have been changed.
I'm new to working with scripts and have played with it a little bit but my knowledge is severly lacking, I picked up script pro and have had some success batching simple commands.
What I have is a large database with differing layer convensions that I want be able to run a script that will open rename layers save and close, the layers are not of the same name but similar enough that I could set peramiters for less then a duzon layer names and catch my target then rename it to a standard, for example "A-wall exterior" to "A-WL-EXT", a simple enough command but within the database the "A-wall exterior" could be one of a duzon simmilar names.
My thought was to run the -rename la "layername" "layername" qsave script but when the original layer is not found it gets stuck untill script pro times out and fails. If there is some way to search out names and once found rename that would work.