LISP "plot into drawing folder" not starting/working properly

LISP "plot into drawing folder" not starting/working properly

bluedots
Enthusiast Enthusiast
1,015 Views
4 Replies
Message 1 of 5

LISP "plot into drawing folder" not starting/working properly

bluedots
Enthusiast
Enthusiast

Hello dear supporters,

 

in short: LISP script does not start with every drawing opening or will be cancelled by Acad.

So it must be something basically wrong. But I guess it is not the drawing folder on the network, because when I load it manually (Appload) it is working. When I put the file in the "startgruppe", it (or something else?) still will be cancelled (see bottom) but it seems to work.

 

Details:

-ACAD Mechanical 2019, Version: 23.0.46.0

- Lisp routine I found "here":

 

(defun c:PPATH ()
   (command "PlotToFilePath" (getvar "DWGPREFIX"))
   (princ "\nPlot path now matches Drawing path.")
   (princ)
)
(command "PlotToFilePath" (getvar "DWGPREFIX"))

 

 

-I put that as suggested in a file named "acaddoc.lsp" in C:\Program Files\Autodesk\AutoCAD 2019\Support

-the log says:

 

Regeneriert Layout.
Regeneriert Modell.

Prüft Mechanical-Daten...


Anzahl gefundener Fehler: 0    Anzahl behobener Fehler: 0

Prüfung der Mechanical-Daten beendet.

Cloned:   <AcDbDictionary      >
-980810416  -->  -305120944
IsCloned: 0
IsXlated: 0
Cloned:   <AcDbDictionary      >
-366741344  -->  -305120224
IsCloned: 0
IsXlated: 0

AutoCAD Menü-Dienstprogramme geladen.PlotToFilePath \\somewhere_in_network\1\2\3\etc\ *Abbruch*

 

 

 

I tried something without the lisp file (and w/o the entry in the "Startgruppe"): the error is still there:

 

AutoCAD Menü-Dienstprogramme geladen.*Abbruch*

 

 ??

Best regards
MfG
Torsten
----------
ACAD 2022
Win 10 Pro, 64 bit
AMD Ryzen 7 3700X 8-Core Processor 3.60 GHz
RAM 32 GB
NVIDIA GeForce GTX 1660 S
0 Likes
Accepted solutions (1)
1,016 Views
4 Replies
Replies (4)
Message 2 of 5

bluedots
Enthusiast
Enthusiast

@bluedots  schrieb:

When I put the file in the "startgruppe", it (or something else?) still will be cancelled (see bottom) but it seems to work.


ok, "startgruppe" doesnt work either. Is that right, that it only is meant for running at AutoCAD start, not at opening a drawing?

 

Another error now confuses me totally: even when I "appload" the acaddoc.lsp out of AutoCAD2019/support and the parameter PLOTTOFILEPATH is getting the right Path, even then the plot window opens in some folder used way way back.

What is wrong?! Please help!

 

Thank you in advance!

Best regards
MfG
Torsten
----------
ACAD 2022
Win 10 Pro, 64 bit
AMD Ryzen 7 3700X 8-Core Processor 3.60 GHz
RAM 32 GB
NVIDIA GeForce GTX 1660 S
0 Likes
Message 3 of 5

Sea-Haven
Mentor
Mentor
Accepted solution

Its an enviroment variable

 

(setenv "PlotToFilePath" (getvar "DWGPREFIX")))
Message 4 of 5

bluedots
Enthusiast
Enthusiast

Thank you.

 

what seems to be working now is:

-in C:\Program Files\Autodesk\AutoCAD 2019\Acadm\acaddoc.lsp add code:

 

(load "acaddocplot.lsp")

 

-and in the same folder put the lisp file with the first mentioned code:

 

(defun c:PPATH ()
   (command "PlotToFilePath" (getvar "DWGPREFIX"))
   (princ "\nPlot path now matches Drawing path.")
   (princ)
)
(command "PlotToFilePath" (getvar "DWGPREFIX"))

 

 

I don't know why, but it seems for Mechanical the folder AutoCAD 2019\Support doesn't work although the path is included in the search entries. *shrug*🙂

Best regards
MfG
Torsten
----------
ACAD 2022
Win 10 Pro, 64 bit
AMD Ryzen 7 3700X 8-Core Processor 3.60 GHz
RAM 32 GB
NVIDIA GeForce GTX 1660 S
0 Likes
Message 5 of 5

bluedots
Enthusiast
Enthusiast

according to  @Sea-Haven :

got to check that loading different dwg-files and plotting afterwards each single one sets the "PlotToFilePath" to path of last opened dwg.

 

better way may be to load the ppath.lsp really before each plot

or use a script, visit:

https://forums.augi.com/showthread.php?93557-Default-Plot-File-Location

Best regards
MfG
Torsten
----------
ACAD 2022
Win 10 Pro, 64 bit
AMD Ryzen 7 3700X 8-Core Processor 3.60 GHz
RAM 32 GB
NVIDIA GeForce GTX 1660 S
0 Likes