when i invoke the plot command, it will first check if there is a layer state called "Temp"if "Temp" exists, then delete "Temp", then re-create "Temp", then switch layer state temporariliy to "Plot" to plot the file, and then switch back to the "Temp" layer state againbasically, the "Plot" layer state will be set based on how the drawing(s) will plot. if a user makes changes here-n-there in the drawing, when the user wants to plot, the software will save current state as "Temp", plot using the "Plot" state, and switch back to "Temp" state at the end. all i am trying to achieve is to somehow over-write the "Temp" state. below is the LISP.
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?
I find that the command to move objects to a different layers runs very slow in one of the drawing. I want to find out what wrong with the drawing and how to speed things up.
I have a LISP program that batch processes a large number of drawings. One of the step to process each drawing is to change the colors of some objects according to the status of the objects. I do this by moving the objects to a later that has the right color. So far the program only takes 2 to 4 minutes to process each drawing. But the program takes close to 90 minutes to process one specific drawing. I track down the problem has to do with the command that moves the objects to the right layer, like this:
This command takes a very long time to finish, like 40 minutes each time it runs (to move 1200+ objects), and the program needs to run it twice for a total of approximately 80 minutes.
Please note that the drawing itself is not the largest drawing, and it doesn't have the largest number of objects to be moved either. It is close to the top-5 drawings in term of drawing size and the number of objects to be moved. I cannot say that the drawing size or the number of objects to be moved are the cause of the problem.
I tried to "speed up" by moving 200 objects incrementally. That didn't work. I tried to "speed up" by moving 100 objects incrementally and saving the drawing after each 100 objects are moved. That didn't work either; actually the speed is slightly slower than simply moving 1200+ objects all at once.
I don't know what to do. I believe there may be something unusual about that drawing. By the way, the reason why I choose to change color by moving objects to a different layer has to do with the fact that I have found this is the best way so far. I tried to change the color of the objects directly. But I find that the color of some sub-parts of the objects are not changed (because their color is by-layer). That's why I choose to change color by moving objects to a different layer.
How I can check the drawing, any different way to change color that is better.
I would like converting all objects that has forced linetype to be on a linetype layer.
So if there are objects that have forced linetypes - dashed/hidden/phantom, etc., those entities would be moved to a linetype layer based on their forced linetype. The entities would all be changed to color bylayer, linetype bylayer.
So if there is a rectangle that is sitting on an EQUIPMENT layer, the routine would put that rectangle on a new layer called DASHED and change its forced linetype to BYLAYER.
Lastly, once that's done, the next and final step is to locate a the existing layers with matching linetype - say, OBJECTS with DASHED as a linetype, and merging it to that layer.
Can I have a lisp to select all objects in the layer "Defpoints" (including model and paper space, and including objects inside blocks) and change the color of those objects to color 30?
Is there a LISP code for disabling OSNAP for specific objects or layers? An automatic disable for multileaders would be useful when fine tuning the text placement. Trouble is you need the snap for the leader end. Maybe you could disable the snap for the text grip only.
we have a good size project going on with lots of view ports of a base map (floor plan or site plan). Then we set the viewport layers the way we would like it, but along the way, we keep getting updated base maps (floor plan or site plan) with new layer created in them. These newly created layers are for the originator and will not affect our project.
Is there a way to have our project set to ignore any newly created layer from the originator of the base files? That is, we have our project (viewport layers) set the way we want it. When we get an updated base file, replace the xref(s), our layer state will still be the same, ignoring any newly created layer, automatically. I sure hope I am clear enough here.
Our problem is that when we get a new base file, then we would have to go to every file that has a viewport related to this new base file and turn off the new layers.
There are many lisp that draw offset line but what about opposite way , I have wall of double line i need to delete one of them let's say inside wall line .
why i need to do this usually when i tracing in external program like autocad architecture or Revit or archicad i just need outline of exterior and interior walls !.
is there way that can delete the offset line ?(or within range predefined in lisp to prevent interfering of lines deletion).
A plugging we use has just updated and loading double menus causing error messages prompting that menu already exists unable to load.
In my cui the menus are loaded in my enterprise as well as my main.
How do I keep the menu with the same name in my enterprise yet unload the one of the same name in my main (where it shouldn’t be) using lisp (I want to Automate this using lisp, since I'm not always in office at the same time as everyone else)?
I am looking for code that will delete all the properties within a DWG file.
Searching the forum, I found the following
; Remove any existing Properties (dictremove (namedobjdict) "DWGPROPS")
However, further research (forum, testing and help system) indicates that it no longer applies to current releases of AutoCAD so my initial happiness was short-lived!
The below gets the block names of empty block records. The blocks may or may not be actually inserted in the dwg. In my case though, apparently they are nested in other blocks in the drawing I am working with... but it looks as if they are part of deeply nested block definitions and therefore cannot be purged. I checked a couple blocks (the code returns over 1000 in my case) it returns and there are no objects in its definition.
How can I force them out of a drawing - and hopefully reduce it's file size?
I would like to use a lisp routine to open all the files in a selected folder, search for a blocks by name, delete them, purge the drawing, save and close.
trying to delete a file every time CAD is fired up and/or a new drawing is opened. i cannot make it work so far. planning to incorporate it into acaddoc lsp file.
I have a company .cuix menu that is loaded as a partial menu to the main acad.cuix file. I want to delete all the toolbars and pull down menus associated with it and leave the other stuff in place. This is in Autocad 2011 but should also translate to 2013. So far, I have tried opening the CUI menu, going to the company.cuix partial menu and deleting the toolbars. Then I hit save, then Apply. Toolbars disappear and pulldown menus go away. But when I reload AutoCAD they come back.
I have a program that makes 3d polylines from various data. That 3d pline then gets added to a civil 3d surface as a breakline. I want to modify the pline with my program, but preserve the handle, as I think that is what C3D uses to decide if its part of the surface. I tried this as a sample with no luck:
;DELETE 3RD VERTEXT FROM 3D PLINE (DEFUN C:T3 ( / EN ENAME ENT ENTL) ;GET 3D PLINE (SETQ ENT (ENTSEL " Select 3D Pline:")
[Code] .....
I know you can modify a vertex, but what about add and delete with entmake and entmod? I also considered using activex for this task, but you can only add verticies from what I could tell in the object browser of VBA, not delete them.
What I will be doing is deleting all the verticies and adding back the correct ones. Or if there was a way to transfer a handle to a new entity after deleting the old, that would suffice too.