AutoCAD Visual LISP / AutoLISP :: Set Plot Scale By Annotation Scale?
Aug 9, 2012
I am working on automating page setups in model space and am looking for a way to set the plot scale equal to the annotation scale for scaled drawings with
(setvar "filedia" 0)
(setq a (getstring (getvar "cannoscale")))
(command "-plot" "YES" "MODEL" "" "" "" "" "" "" !A "" "" "" "" "" "" "_Y" "_N")
Setting the plot scale with !A causes the lisp to fail. However, when running each prompt through the command line individually, !A works fine. what is missing?
View 2 Replies
ADVERTISEMENT
Apr 26, 2013
take a look at the test.dwg it contains a block named 'box' (which is a rectangle) and some attributes. the annotation scale is 1:1 and i zoomed in to focus on one attribute.
change the annotation scale to 1:2 and you will see the attribute grows by 2 - that's ok! now load attmod.lsp and run attmod command and you will see the attribute grows again by 2
even the command only (entmod) the attributes without making any change.(to restore it use battman sync)Is there a workaround to this bug?
View 4 Replies
View Related
Apr 10, 2013
I would like to find a lisp that changes the scale of something that has an annotative scale and deletes all other scales in the object scale list. Often i have many different scales of existing dimensions or objects. i waste a lot of time opening the annotation object scale dialogue box, selecting add, finding my scale and deleting the old scale.
View 3 Replies
View Related
Mar 15, 2011
I work in autocad 2010 and I draw in scale 1:1 . What an annotation scale is, moreover I have never used annotative objects in my drawings.
Nonetheless, when I try to plot a drawing, while I am in the model view, I choose the scale in mm/units, I select the plot area and when I press preview or plot, I get the message THE ANNOTATION SCALE IS NOT EQUAL TO THE PLOT SCALE. DO YOU WANT TO CONTINUE?
I press yes, I print it and the outcome is always a bit smaller than it should be.
When i am in the layout mode and I try to plot, I dont get this message. But I dont know how scaling works in this case. For example I want to plot in a A4 paper, scale 1:100. So I type 1000mm/100units, as I did in the model mode, but the result is wrong.
View 3 Replies
View Related
Sep 20, 2012
I do warehouse layouts: circles, squares and rectangles. I don't know a thing about these scales.
I get this message when i try to print D-size drawing. Received this drawing from outside source and need to print.
View 4 Replies
View Related
Feb 2, 2012
I am adapting a routine by Alan J Thompson found here for placing an outline of a paperspace viewport in modelspace.
I have added some lines for making a suitable No plot layer with appropriate linetype, and wanted to make the lwpolyline have a thickness dependent upon the viewport scale.
My paperspace viewport scales are set for printing via Zoom - 1/50XP for example to get a 1:50 scale plot (or 0.02XP)
Having selected the relevant viewport, I wanted to be able to determine the vp scale, but am unsure how to extract this information from the viewport entity itself.
The routine was as follows:-
(defun xpfact ()
(- (car (trans '(1 0 0) 2 3))
(car (trans '(0 0 0) 2 3))
)
)
--
View 3 Replies
View Related
Feb 7, 2013
Is there a way or a lisp to scale multiple 3d polylines, at same time, and the base point is the start point of each one?
View 4 Replies
View Related
Oct 10, 2008
A2008. Is there a setvar, setenv, registry entry etc. that can be used to change the scale of Multileaders with annotative off to have the same effect that DIMSCALE has on Q leaders? I want to have a single scale-independent Multileader style and modify it on the fly along with DIMSCALE and LTSCALE. I'd use Qleader but UCS's do odd things to text position and orientation.
View 4 Replies
View Related
Jul 15, 2013
I am working on a script. I need to select all lines and polylines and set there linetype scale to 1.
I'd take a simple lisp routine if that would be easier.
View 9 Replies
View Related
Apr 26, 2012
I am attempting to create an AutoLISP that removes all un-used drawing scales from a file, then adds the standard scales used in civil engineering. This is what I tried using:
;;;Add Engineering Scales
(defun C:AES ()
(command ".CANNOSCALE"
"1" = 1'"
(command "-scalelistedit"
[code]...
Now, I am only a beginner to writing LISP, but I know that my problem is that it is reading the inch marks after the one in the scale name as a enter, but I don't know how to get around this. Also, I don't know how to get it to skip scales that are still in the drawing.
View 5 Replies
View Related
Oct 8, 2009
Is there any way to make a block uniform scale using lisp? and also make a block drawing uniform scale?
View 5 Replies
View Related
Jan 8, 2014
Any Lisp Routine to scale text objects a certain value and have the program actually scale each text object as you pick them.
The change text height using the Properties function does not work for what I need because the objects I need to scale are Mtext objects with Background Mask, and when you use the Properties function to change their text height it messes up the background mask so that you have to select each text entity and stretch the mask area smaller or larger, but if you use the scale function it scales the background mask as well so the background mask coverage is still the same.
View 2 Replies
View Related
Jul 17, 2013
I had been trying to insert a title block (block) in to a drawing as part of changing the title block But in some drawings the block gets scaled off. Is there any system variable or any solution to maintain the drawing without getting scaled while inserting block.
I had used -dwg units and this appears to single drawings only. Any other way to do this to all the files in a folder.
View 1 Replies
View Related
Aug 29, 2012
I have a problem that I cannot seem to solve. I have a drawings with a whole bunch of layout tabs that have a few viewports in each tab. One of these viewports on each layout tab is on the layer VIEWPORT. I did this so it would be easy to filter out the other viewports in the drawings. I am using the code below to change all of the viewports with the layer VIEWPORT to the Custom Scale 0.020833. This works for all of the layout tabs except the first tab. It will not for some odd reason work on the fist tab.
(setq vieportfilter (list (cons 0 "VIEWPORT")))
(setq ssetvp (ssget "x" vieportfilter))
(setq cntrp 0)
(while (< cntrp (sslength ssetvp))
[code]..........
View 1 Replies
View Related
Dec 6, 2011
I have the below code (from a user here on the forum) which works great for aligning text, mtext and blocks to 2 points. For annotative entities, it respects the rotation angle for mtext and text.
ie I have an mtext object at 1"=20' scale and at 1"=40' scale. I run the command when the current annotative scale is 1"=40'. The object at 40' scale has changed, but the 20' scale is unchanged. This is working as I would like it to.
But for annotative blocks, it gets weirded out. In the above example, the block at 40' will rotate, but so will the attributes at 20' scale. But linework and hatching at 20' scale will be unchanged. it looks really weird. how to get it to play nice with blocks. Ideally, I'd like the block to be at different rotation angles in different annotative scales.
(defun C:R2P (/ ss ang edata); = Rotate objects to align with 2 Points (setq ss (ssget '((0 . "*TEXT,INSERT"))) ang (angle (getpoint "
First alignment point: ") (getpoint "
Second alignment point: ")) ) (repeat (sslength ss) (setq edata (entget (ssname ss 0))) (entmod (subst (cons 50 ang) (assoc 50 edata) edata)) (ssdel (ssname ss 0) ss) ))
View 2 Replies
View Related
Jan 18, 2012
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:
(setvar "CANNOSCALE" (strcat "1" = " (rtos variable 2 0) "'"))
But I get this error when I try to run it.
; error: bad argument type: numberp: nil
View 3 Replies
View Related
Oct 18, 2013
calculation a viewport scale of 1"=30'.
I've looked around and only find nearly what I looking for. For 1"=20' I have a value of 0.004167 Paper Units = 1 Drawing Units, but what is the formula to calculate 1/30"=1'-0"?
View 7 Replies
View Related
Apr 25, 2013
I'd like to run one command that allows the user to draw a polygon viewport then sets that VP to 1/8"=1'-0".
It can be nearly accomplished with a macro, but falls just short because the polygon vp requires an unknown number of clicks, so there is no way to know how many pauses for user input in the macro.
View 6 Replies
View Related
May 24, 2002
Any lisp routine where you can select objects and do a global rotate, scale, etc. from each object's insertion point ?
View 9 Replies
View Related
Feb 25, 2013
Plot scale / Annotation scale / Viewport scale
I couldn’t figure out how these three types of scales are correlated with one another. For example, my drawing unit in AutoCAD is meter. And thus if I need to print my drawing with a scale of 1:200 then I set the annotation scale to be 1:2viewport scale to be 1:2plot scale 100:1000
if I need to print my drawing with a scale of 1:20 then I set the annotation scale to be 5:1viewport scale to be 5:1plot scale 100:1000
I couldn’t derive the rule that controls these three types of scales. This is also quite confusing when working with C3D! Sounds not the same logic is applied.
View 9 Replies
View Related
Dec 16, 2010
How to change the Scale Uniformly property in dynamic blocks accross hundreds of drawings using either/or scripts, lisp, vba or anything else that might do the job.
I just need to open the drawing and select the block (one block per drawing) then edit the scale uniformly property within the block, save then close the drawing and move onto the next drawing.
View 4 Replies
View Related
Jun 26, 2009
am in the process of setting up a standard file for all designers to use our local office. This file will have most of the styles created for profiles, alignments, surfaces, profile views, etc... as mostly specified by the customer and industry standards.
I am having trouble maintaining the correct annotation scale in the viewport in paperspace and when plotting.
The attached word document has 3 figures. Fig 1 shows the correct viewport scale and correct annotation scale. Fig 2 shows how the annotation scale abruptly changes during the plotting process. This abrupt annotation scale change sometimes happens during the regen process or when I switch from layout to model space and back to layout.The annotation scale goes from 1:1 to 1:40 just as in the viewport. This change in annotation scale is not supposed to happen because I want to preserve a certain plotting height for my text versus a viewport scale by using various annotation scales.
I have researched the procedures for annotation scale and have not found any info related to this "abrupt change in annotation scale".
Curiously , this abrupt change in annotation scale does not happen if the text does not belong to any styles within Civil 3D. Stand alone text stays at the correct annotation scale and is not affected in the same way.
View 9 Replies
View Related
Mar 29, 2011
I have a Viewport set to scale 1:100 and the Viewport is locked.The Annotation Scale displayed in the Viewport was 1:50.
When I clicked on the Synchronize Icon beside the Viewport Scale, the Viewport Scale changed, even though the Viewport was locked.
I was expecting the Annotation Scale to synchronize to the Viewport Scale.
Is this how it is supposed to work? and why does a locked Viewport Scale change?
View 2 Replies
View Related
Apr 19, 2013
I have a block that i would like to scale based on the plot scale when plotting.
We set up our drawings full size and occasionally we want to plot them at half size. We do this by setting the plot scale to 1:2 (custom) in the plotting dialog. We have a few blocks that we want to print at the same size on paper, essentially become twice as big.
Is there is a way to fix the size or just set a few scale states and have them automatically adjust based on the plot scale (not drawing/annotative scale)?
View 1 Replies
View Related
Sep 11, 2012
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?
View 9 Replies
View Related
Aug 30, 2012
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.
View 1 Replies
View Related
Mar 20, 2013
Is it possible to create a lips that does the following:
- In the Modelspace
- Get 2 points to create a plot window / give two points. (get point 1, get point 2, list points)
- Divide the window into A3 size windows
- plot scale 1:100 / prompts to ask
- Plot / Print the A3 size windows with the given / preset configuration(s)
- Perhaps even add a number to each page.
In other words, Plot / Print a A2, A1, A0 or bigger onto several A3 pages.
Depending on how big the page is, number of A3 pages, plotscale 1:100
Or asks what plot scale I want to use.The only thing I think I will need is something like:
Get point 1, get point 2, List the points. So I can set the window.
View 8 Replies
View Related
Jan 24, 2001
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.
Is it possible from AutoLISP in 2000?
View 3 Replies
View Related
Oct 3, 2012
R2012 win7
Can you plot to file using a "file share" location? i.e. \\bcnymfilp01\Parts_Labels\88881"
(vl-cmdf ".plot" "Y" "" "\\bcnymprtp01\Proto Label Printer" "Legal" "I" "Landscape" "N" "E" "Fit" "C" "Y" "monochrome.ctb" "Y" "A" "Y" "N" "Y" "\\bcnymfilp01\Parts_Labels\88881" "Y" "Y")
Everything seems to run but when it comes to the plotting, AutoCAD crashes.
Findfile works fine:
Command: (findfile "\\bcnymfilp01\Parts_Labels\50981.plt")
"\\bcnymfilp01\Parts_Labels\50981.plt"
View 6 Replies
View Related
Feb 21, 2001
Is there a way for me to change a layers plot style from one to another with LISP?
We use named plot styles, STB's not CTB's.
I want to be able to create an icon that will change all layers with the plotstyle "normal" to "black". Is this possible with lisp?
View 6 Replies
View Related
Jul 9, 2013
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.
(defun plotbatch ()(vl-load-com)(setvar "sdi" 0);; open file(setq acadobject (vlax-get-acad-object))(setq documents (vla-get-documents acadobject))(setq open (vla-open documents "U:\testfile.dwg" :vlax-false));; changing something;; plot layout(setq plot (vla-get-plot open))(vla-put-NumberOfCopies plot 1)(setq layouts (vla-get-layouts open))(vlax-for each layouts (if (= (setq name (vla-get-name each)) "TestLayout") (progn (setq salayout (vlax-make-safearray vlax-vbString (cons 0 0))) (vlax-safearray-put-element salayout 0 name) (vla-setlayoutstoplot plot salayout) (setq errmsg (vl-catch-all-apply 'vla-PlotToDevice (list plot "\\RW-PRN01\RICOH"))) (if (vl-catch-all-error-p errmsg) (prompt (strcat "ERROR: " (vl-catch-all-error-message errmsg))) ) ) ));; close file(vla-close open :vlax-false)(princ))
View 9 Replies
View Related