View Full Version : Plot Stamp System Variable...
I was wondering if there is a system variable or any way to automatically set the Plot Stamp Settings (PSS) file each time a user logs on...I want them to use the one on the network...Thanks in advance for the help...
GuinnessCAD
2007-03-09, 08:47 PM
I dont think that there is a variable. But you could write a script routine to change the fields every time acad is opened. Could be a little overkill but will get the necessary results. Try "-plotstamp" and you can then see the necessary input you would need.
Ed Jobe
2007-03-09, 08:53 PM
Here's how I do it in vba:
Sub SetDefaultPlotStampSettings()
'Set the default plot stamp settings
Dim vProfiles As Variant
Call AcadApplication.Preferences.Profiles.GetAllProfileNames(vProfiles)
' List all the profiles for the system
Dim x As Integer
Dim strRegPath As String
Dim strPSS As String
strPSS = "J:\EA\CadMgr\Map 2005\Inches.pss"
For x = LBound(vProfiles) To UBound(vProfiles)
strRegPath = toolbox.ejMisc.GetAppRegBase & "Profiles\" & vProfiles(x) & "\Dialogs\Plot Stamp"
toolbox.ejAPI.WriteRegLong HKEY_CURRENT_USER, strRegPath, "PlotStamp", 1
toolbox.ejAPI.WriteStringValue HKEY_CURRENT_USER, strRegPath, "PSPFilename", strPSS
Next
End Sub
This sub is called in the begin plot event. To do this in lisp, you'll need a way to write to the registry.
This seems like quite a chore...It also seems a little weird that AutoCAD has no system variable for the plot stamp file...
The guys here do not need much...They need paper size and location and really nothing more...I think the route that I am going is to eventually redefine the plot command that will set up the plot stamp based on the paper size selected...The problem is finding the time to write that code...
Thanks for the help fellas...
jsowinski
2007-03-09, 10:59 PM
Hi everyone-
You're right, there isn't a variable to use for plot stamps. However, I'm currently using AutoCAD 2004 and this is what I use to make a plot stamp current. It will write the plot stamp to the registry. I set up a script file and run it whenever someone new starts.
(vl-registry-write
(strcat "HKEY_CURRENT_USER\\"
(Vlax-Product-Key)
"\\Profiles\\"
(vla-Get-ActiveProfile
(vla-Get-Profiles
(vla-Get-Preferences
(vlax-Get-Acad-Object))))
"\\Dialogs\\Plot stamp")
"PSPFilename"
"C:\\Directory\\My Plot Stamp.pss"
)
You need to replace the last line with your own path and plot stamp. Hope this works for you.
jsowinski
vBulletin® v3.6.7, Copyright ©2000-2009, Jelsoft Enterprises Ltd.