Jump to content

Recommended Posts

Posted (edited)

So currently I have the settings of the Plot Stamp for all users being set in the ACADDOC.lsp file and it is working just fine however I have been asked to create plot stamps that define the stage of the checking process the drawings are being printed for. I have no problem doing this however some of our autocad users find it hard to set the properties for the plot stamp so we end up with different looking plot stamps depending on who is setting it up.

 

All that said here is what I need the help with.

 

I have created the .pss files to be loaded as the plot stamp for each stage of a project, however I want these to be read only as I don't want users making adjustments unless they are absolutely needed. Now my question is, is there a way to load a .pss file in the ACADDOC.lsp? I would like everyone to have a default .pss and have to load the .pss they need as it depends on what stage of the project they are in and I would like them to have to select that.

 

I am having this issue because AutoCAD remembers the last loaded .pss file and from that point on that .pss file is the one the user will be using unless they change it. I would like to just turn the plot stamp on and load a default .pss within the ACADDOC.lsp file if possible.

 

If you know of a better way to accomplish this I am open to suggestions.

 

Thanks

Edited by AQucsaiJr
added a little more info.
  • 2 weeks later...
Posted

So I got this far and I need some help with one more detail...

 

I figured out how to get the ACADDOC.lsp file to load a default .pss file. Now I need to add a line to the ACADDOC.lsp file to turn the plot stamp on, however I have this default .pss file set to read only, to avoid users changing it, and I keep getting an error saying that the .pss file can not be changed. Is there a way I can get around this?

 

Code I am using... This code pulled from - HERE

(defun PGEPS ( )
(setq file "W:\\ACADE_STANDARDS\\Plot_Stamp\\Default.pss")
(defun getPlotStampRegistryKey ()
(strcat
"HKEY_CURRENT_USER\\"
(vlax-product-key)
"\\Profiles\\"
(getvar "cprofile")
"\\Dialogs\\Plot Stamp"
)
)
(defun getCurrentPss ()
(vl-registry-read
(getPlotStampRegistryKey)
"PspFilename"
)
)
(defun putCurrentPss (file)
(vl-registry-write
(getPlotStampRegistryKey)
"PspFilename"
file
)
)
(putCurrentPss file)
)
(PGEPS)
(princ)

 

 

ATT ADMIN: This post may need to be moved to the LISP coding thread.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...