I have used Autocad since 1991, and my current job required me to use Microstation. One feature I liked from Microstaiton is the ability to select and open an external DGN reference, and then match the view of the parent DGN. In AutoCAD, you can also select and open an xref, but the DWG opens to the previous saved view, and not to the desired view that matches the layout.
My thought was to experienting with lisp or scipt and export the "Viewctr", "Viewtwist" and "Viewsize" variables to a text file, then importing the text file and using the "Viewtwist" as my "SNAPANG" value, then "Viewctr" as my "ZOOM, CENTER" value, and finally the "Viewsize" as the "Enter magnification or height:" value.
But, alas, have no time, and not quite the knowledge to duplicate MicroStation's open-xref-and-zoom-to-view feature.
I've been looking for commant that will allow me to copy a selection of entities to another layer for details. I'll need to be able to select several objets all at once and have each of them maintain the correct colors, linetypes, lineweights. Most everything is set as bylayer but that makes everything change once the objects are moved to a new layer.
How can I keep the everything looking like it never changed except for the fact that it will be moved to a new layer - layer 0 in this situation?
The crux of the matter is that the CANNOSCALE value needs to match an existing named scale. This lisp is part of a bigger lisp and I need to pass a variable into it. Here's what I have:
Normally when applying the matchprop command in CAD, one has to first pick the template element, and then select the elements which should have this template element's properties copied to/matched.
is it possible (via lisp perhaps?) to reverse this order, so that i can select a bunch of elements (e.g. through the quickselect icon) and THEN apply a matchpropertieslisp command, then select a single template element which the initially selected elements should mimic?
I have a series of blocks that I need to insert into a drawing, maybe 100-200 times and then change one of the 6 attributes by an increment of 1.
I've looked at some of the older posts and have not been able to do this. Is it possible to take the tag regerence, in this case OUTLET_REF and automatically add 1 to it when the symbol is inserted.
Can this be done using Diesel or with a bit of lisp?
I'm creating the following macro:- (defun C:BK () (command "_BREAK" PAUSE "_F" PAUSE "@" )(princ)) to add to a shortcut key lisp file and then I want it to repeat... How do I make it repeat?
I want it to do the same as this:- *^C^C_break \_f @ but as a shortcut key in a lisp format.
I have a lisp that draws variety of entities such as lines, arcs, hatches, points, blocks, text etc. How can I make one single block containing all of them, i.e. one block that has all items drawn since the lisp was invoked.
Is there any way to grab the Object ID or name from a layout tab to use in a field? I wish to link the layout name to a callout block so that if the layout tab changes position and name (inserting a new tab), the call out block will update no matter what page it is on. Without using the Sheet Set manager.
Is there a way to apply a single string value "Phase1", or "Phase2" to all layers in a drawing? I though about exporting a Layer State, modifying it in Excel, then re-importing the layer state, but, Layer States don't store a value for "Description."
I'm creating a consolidated map from several drawings, but I'd like to be able to separate the layers from each drawing. Description seems like a good value to populate and be able to sort by in the Layer Manager.
I have a routine that looks for an MText date stamp and replace the old date with a new date. The problem is some MText strings appear encrypted. Below is an example:
{\H1.121x;\C1; \LFY 2011-12\l \H0.6252x;04-30-11} This is what I should get when I extract the string (as shown in Property window)
(1 . "\pxi-2.1818,l4.3636,ql,t4.3636;{\fSymbol|b1|i0|c2") is what I get when I extract the group code.
how to do this programmatically and without modifying the handle of the object,i am trying to do it programmatically (entmod (cons 410 newname)(assoc 410 ... no luck.
(entmakex -ing will modify or create a new handle ctrl-X and then ctrl-V recreates a new handle too ...
I want to know the correct way to find the offset origin of a layout in an AutoCAD drawing. Let say I have a drawing that has many items on it. And I create a layout showing just the items in the lower right corner of the drawing. I want to know the offset origin of this layout relative to the Model space.
I came across some LISP commands that are supposed to do just that:
Is it even possible to get the entity name of the last block added to a layout? I need to find the entity name of the last block added to each of three layouts.
Previously I was using entlast but obviously that will not descriminate per layout.
I need to get the layout list in reverse order. How to do this? My plotter outputs prints face up and I wind up with a stack of drawings in reverse order - If I can cycle through the tabs in reverse order they will wind up in the correct order in the print room!
I need to select all the viewports in the drawing and to make some changes with them, I'm planning to select them all with ssget command. If I do that I will have one viewport for the paperspace itself in every layout. One of my question is, how to know which viewport is the paperspace itself?
Second question is, how to get the name of layout in which one is the viewport? It is important to me that the lisp is really fast, so I'm planning to do the most of stuffs with vla commands.
I’m trying to create a view port, which covers my entire layout (white/ page area) using the following command
(command “mview” ‘(0 0 0) ‘(297.5 210 0))
However as you will note 0,0,0 is not the very edge corner of my layout (white area) and my white area is smaller then 297.5x 210mm (standard A4 landscape size)
How to obtain the exact measurements and starting coordinates to fully fill my entire layout page (white area)?
I need a routine that will duplicate the current sheet's Layout tab and content to the next tab, set it current, delete the titleblock (by name) on the new tab and reference in a differently named titleblock, 1:1, 0,0 onto the new Layout tab. I'll be running this in a batch script.
Any LISP routine that can create multiple paper space layout tabs and can name them incrementally. I have a template and I wanted to copy tab2 of my layout multiple times and name them incrementally. I have a code shown below that comes close to what I need it to do but it creates a "New Layout" instead of copying the tab I need it to. Please see code below:
(vl-load-com)(defun c:LAYOUT+ (/ *error* prefix i n acDoc oLayouts layoutName) (defun *error* (msg) (if acDoc (vla-endundomark acDoc) ) (cond ((not msg)) ; Normal exit ((member msg '("Function cancelled" "quit / exit abort"))) ; <esc> or (quit) ((princ (strcat " ** Error: " msg " ** "))) ; Fatal error, display it ) (princ) ) (if (and (setq prefix (getstring " Enter layout name prefix: "))