AutoCAD Visual LISP / AutoLISP :: Open / Change And Plot DWG

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


ADVERTISEMENT

AutoCAD Visual LISP / AutoLISP :: How To Change Plot Style

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

AutoCAD Visual LISP / AutoLISP :: Change Plot Style Table?

Oct 3, 2012

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.

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Plot Transparency Option In PLOT Dialog Box

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

AutoCAD Visual LISP / AutoLISP :: How To Add Cadfile Plot Date And Plot Time As Attribute

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

AutoCAD Visual LISP / AutoLISP :: Create Plot A0 Or A0+ Onto Several A3?

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

AutoCAD Visual LISP / AutoLISP :: Plot In A File Some Windows?

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

AutoCAD Visual LISP / AutoLISP :: Plot To A File Share

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

AutoCAD Visual LISP / AutoLISP :: File To Plot All Layers ON?

Mar 6, 2013

Lisp file to plot all layers on,

I’m not sure if there is a lisp file that cans Plot All Layers ON at a time instead of going to the long story of the layer properties manager.

Software: AutoCAD 2014, AutoCAD C3D, AutoCAD M3D, Revit
Windows 7 (Ultimate 64 bits),
Firefox 20.0,
Kaspersky 2013.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Display Plot Styles In 2012

Mar 18, 2013

Attached LISP will toggle the 'Display Plot Styles' for all layout tabs or the current layout tab.  In 2010 it would not affect model space. 

With 2012, AutoCAD added 'Display Plot Styles' as an option on the model space tab.  This routine now affects that tab. 

How to make it not change this setting for the model space tab?

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Changing Default Plot Stamp

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

AutoCAD Visual LISP / AutoLISP :: Plot A File With Block / Attribute Name

Jan 23, 2012

I would like to :

-select an attribute block in my layout viewports

- select a directory where the PDF will be saved

- select the printer

and zoo.

All my layouts will be printed. The files will be created. The filename will be the attribute name (different in each layout viexports).

[ACAD2011 CIVIL3d]

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Custom Plot From Windows Explorer

Jan 27, 2012

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. 

Acad 2012
Win 7

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Set Model Space To Display As Plot Style?

Jun 28, 2012

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!

View 3 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Plot Stamp Shows Temp Folder When Publishing?

Jan 2, 2014

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.
 
$(GETVAR, "dwgprefix")$(getvar, "dwgname")$(edtime, 0, M/DD/YYYY H:MM:SS AM/PM), $(getvar, loginname)

Civil 3D 2013
Windows 7 64-bit
Xeon W3550 3.07 GHz
Nvidia Quadro 4000
12.0 GB RAM

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Unable To Read Plot Settings From Variable In Text File

Sep 2, 2012

I’m trying to create a plot command that reads settings in from a variable stored in a text file but its becoming muddled up somewhere.

(defun c:MYPLOT ();Setting nessesary variables...(setq fname "C:/ICT/AutoCAD_Architecture_Suite_2012/CUSTOM/TREADSTONE/PEN/MYOUTPUTDEVICE.PEN")(if(setq f(open fname "r"))(while (setq MYOUTPUTDEVICE (read-line f))(close)))(setq fname "C:/ICT/AutoCAD_Architecture_Suite_2012/CUSTOM/TREADSTONE/PEN/MYPAPERSIZE.PEN")
[code].......

View 5 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Any Other Way To Open Up Blocks

Apr 12, 2012

I have this code w/ which I can open up Block Library Blocks for editing.  We have R2012 installed w/out VBA.Our MIS department is impossible to deal with.  We have this new fangled permission hysteria so I cannot install VBA myself.Is there any other way to open up my blocks? What I can I do instead?

(defun CpL () (prompt "...Open Library Block or Xref...")(terpri)
(setq a (entsel)) (setq b (car a )) (setq c (entget b)) (setq d (assoc 2 c))
(setq e (cdr d)) (setq ff (strcat e ".dwg")) (setq PP (findfile FF))
(setq opath (strcat "acadapplication.documents.open ""PP"""))
(command "vbastmt" opath))

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Setting Workbook Already Open?

Nov 3, 2011

I need to use visual lisp to set the workbook if it is already open. What is the syntax for this?

I got the ExcelApp already set as well as the FilePath.

If the workbook is not open then this works

(setq WorkBook (vl-catch-all-apply 'vla-open (list (vlax-get-property ExcelApp "WorkBooks") FilePath)))

I want to be able to see if the workbook is already open and if so set it otherwise open it.

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Open Drawing Read-only?

Oct 18, 2002

How can you open a drawing read-only with autolisp.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Start It With No Drawing Open?

Nov 13, 2001

can you start autocad with no drawing open ?

i would think that some type of script would work or could you change your target on a shortcut?

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Change Z Value Only On 3D Polyline

Aug 23, 2012

I am using acad 2010. I have a contour generator that uses 3d polylines to make contours. I get depressions or tops where I don't want them. I need a lisp routine that will allow me to adjust the z value only on any 3d polyline. I need to raise or lower the z value at any vertex and repeat if necessary. I don't need to prompt the user- I am the user.

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Change VP Linetype

Nov 8, 2012

In our Structural department, we use a layer called S-35-WALL-LB to denote a load-bearing wall, and what the guys typically do when they are on the sheet showing the floor above, is dbl-clk the VP to activate model space, open the Layer Manager and change the VP linetype to HIDDEN to show the afore-mentioned loadbearing walls as walls under.

way to accomplish this through a viewport...but instead of using the Layer Manager, use a lisp routine I can link to a toolbar button where all the user has to do is dbl-clk the VP, press the toolbar button, and either it will convert the default VP linetype (continuous) for S-35-WALL-LB automatically, or get the user to select an object on that layer and it changes the whole lot?

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Remember The File Open Once Or The Path?

Jul 4, 2012

like in AutoCAD there is REMEMBERFOLDERS can u tell me if i use syntax with getfiled and i want the path to be remember next time what should i do or what syntax i use for that.

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Customize PDF Creation - Open PC3 Properties

Oct 23, 2013

I'm trying create a LISP to customize PDF creation.  The lisp looks into the .PC3 file which paper size better fits the plot area. But its exaustive to every time i want to create a new paper size i have to open the .pc3 file and configure a new paper.

There is a way to open the .pc3 properties through lisp?

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Don't Auto Open Or Close Dialogs

May 30, 2013

Is there a way Autocad could just do what I asked for, and nothing more?A few examples

- After publishing, the publish dialog auto closes.  I don't wat that.  After publishing dwf I also want pdf.(I know you can save the list, that's not the point.  If you didn't close the dialog I wouldn't need it)

- When selecting a hatch, the ribbon automatically jumps to Hatch Editor.  I don't want that.  Maybe I just want to change the layer.  I can find the Hatch editor my self..Dito for XREFS

- I do not want any dialog giving me warnings, about anything.  

If an XREF doesn't get attached, I can see that.  I don't need a dialog telling me.If a shape file is missing, I can see that..A triangle sign above the command line is totaly adequate.Don't auto open or close dialogs, for what ever reason.

So ... don't auto do anything I can perfectly do manualy.  No doubt there are a few more examples I can't think of right now.The nice thing would be to get a variable that gives me that "no auto" mode.  

View 4 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Open Standard Drawing From Menu

Sep 4, 2012

I have a small number of drawings that I use very often. I would like to make a menu item to open a certain drawing but I keep getting stuck when the drawing name should be entered automatically.I use the code

^C^Cfiledia;0;open;"test.dwg";filedia;1;

The drawing is my support file search path and the name is unique. How do I get this to work properly?When running this command:

Command: filedia
Enter new value for FILEDIA <1>: 0
Command: open

Enter name of drawing to open <C:previous.dwg>:

*cancel*
Command: "test.dwg"
Unknown command ""TEST.DWG"".  Press F1 for help.
Command: filedia
Enter new value for FILEDIA <0>: 1

It asks what file to open and suggests the last opened file, and whatever I tried so far this keeps happening.

*.scr files are not allowed on our network, I can't create or rename files to *.scr. Of course I could ask the admins to allow this but I think our security policy is more important than me having a button to open a file.

View 6 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Failed To Open Project After Load?

Aug 23, 2011

We have stored lisp in fileserver which 30 users can access it. Now a day some users have getting the ‘failed to open project’ error after load the Lisp due to this they r also not getting most of the commands. The full rights have been given to appropriate folder which contains (Autolisp application source file, .vlx, Autocad VBA source). It has working for limited users (8-10 users).

Server OS: Windows server 2008

Note: Previously we had used windows server 2003.

View 1 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Put List Of Open Drawings Onto Ribbon?

Dec 3, 2012

I want to put the list of open drawings (like the window tab on the menubar has) onto the ribbon? Is this possible?

View 2 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Change Annotation Scale To 1:2

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

AutoCAD Visual LISP / AutoLISP :: Block Colour Change

May 1, 2006

Looking for starting point to writing a routine that will open blocks in a drawing and change the colour.We receive drawings from clients with their blocks and would like to have them changed to our company colours.

So basically, i am looking for something that would within a drawing, change every block to a specific color without exploding and redefining. The colour changes will be the same throughout new drawings.

View 9 Replies View Related

AutoCAD Visual LISP / AutoLISP :: Change Attribute Text

Jun 24, 2012

I have a block "MANAGER" with Two Attributes "CETOP" and "CEBOT" I would like a lisp to replace what ever is in those attributes with defined text, for my purposes "Text1" and "Text2". I would like a simple routine that even I can understand so I can apply it to a couple of other lisp projects I have.

View 6 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved