Autocad -Plot command one of the parameter is not working as expected in custom lsp when opening DWG drawing

Autocad -Plot command one of the parameter is not working as expected in custom lsp when opening DWG drawing

ashwini.pai
Community Visitor Community Visitor
644 Views
6 Replies
Message 1 of 7

Autocad -Plot command one of the parameter is not working as expected in custom lsp when opening DWG drawing

ashwini.pai
Community Visitor
Community Visitor

We have a custom starter lsp script, which when we load the autocad drawing makes some changes to the drawing settings and parameters. One of the section in lsp runs -PLOT command and it is not working as expected in one of the virtual machines.

 

 

FILEIDA system variable is set to 0 before the plot command is executed,  so that FileDialogue does not show up in the process of loading autocad drawing. 

But , when -plot command is executed, The File Dialogue is shown expecting to enter the filepath..(which is not expected since we have set the FILEIDA =0).

 

We are using Autocad 2014 version. and opening *.DWG drawing , OS is Windows 10 where Autocad 2014 is installed.

Plot  command:

(command "-plot" "y" "Merchandise Layout" "DWG to PDF.pc3" "ARCH expand E1 (30.00 x 42.00 Inches)" "inches" "landscape" "n" "extents" "1=1" "center" "y" "." "y" "y" "n" "n" "n" "y" "n")

 

"n" is the FileDialogue parameter which not working as expected in -PLOT command

 

If anyone has faced similar issue and found a resolution please post here.

 

 

 

 

0 Likes
645 Views
6 Replies
Replies (6)
Message 2 of 7

ronjonp
Mentor
Mentor

If it's only one machine doing that, unistall and reinstall CAD to see if it helps.

0 Likes
Message 3 of 7

Sea-Haven
Mentor
Mentor

Maybe replace "." with "ACAD.ctb" as you have not defined a ctb to be used, I also use a loop for multiple layouts opening each layout, so accept "current" or "" for layout name.

0 Likes
Message 4 of 7

Raju.sindripu
Community Visitor
Community Visitor
We tried reinstallation but didn't work out.
0 Likes
Message 5 of 7

Raju.sindripu
Community Visitor
Community Visitor
we disabled the sync and updated the "." parameter as you suggested but no change.
0 Likes
Message 6 of 7

Sea-Haven
Mentor
Mentor

There is no pdfname this is an example see "pdfname"

(COMMAND "-PLOT"  "Y"  "" "DWG To PDF"
	       "Iso full bleed A3 (420.00 x 297.00 MM)" "m" "LANDSCAPE"  "N"   "W"  "-6,-6" "807,560" "1=2"  "C"
	       "y" "Acad.ctb" "Y"	"n" "n" "n" pdfName "N" "y"
    )

 

Message 7 of 7

paullimapa
Mentor
Mentor

1. To disable Plot file request dialog Set CMDDIA to 0:

(setq CMDDIA (getvar"CMDDIA")) ; get current setting

(setvar"CMDDIA"0) ; disable any layer notifications like unreconciled layers 
(command "-Plot") ; run plot sequence
(setvar"CMDDIA"CMDDIA) ; put original settings back
(setq CMDDIA nil)(princ)

2. Lisp code should have defined the plot file name as a variable prior to running Plot command sequence. Let's say it's called pdfplotfilename, the code should also include before the Plot command sequence the file delete function (vl-file-delete pdfplotfilename) 

3. You can manually enter -PLOT command at the AutoCAD command prompt and follow the plot sequence prompts to see what's not working.

4. The last sequence of the Plot command where there's an issue should be changed:

Currently: "y" "." "y" "y" "n" "n" "n" "y" "n")

Change to: "y" "." "y" "y" "n" "n" pdfplotfilename "n" "y") 

This again assumes the lisp code has defined the plot file name to be pdfplotfilename, the pagesetup is not saved and then proceed with plot generation.

5. Lastly, make sure to also set LayerNotify to 0 in case there are any unreconciled layers which would again prompt for correction when running the Plot command:

(setq LAYERNOTIFY (getvar"LAYERNOTIFY")) ; get current setting

(setvar"LAYERNOTIFY"0) ; disable any layer notifications like unreconciled layers 
(command "-Plot"........) ; run plot sequence
(setvar"LAYERNOTIFY"LAYERNOTIFY) ; put original settings back
(setq LAYERNOTIFY nil)(princ)

How to turn off the unreconciled layers notification in AutoCAD | AutoCAD | Autodesk Knowledge Netwo...


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes