TheSwamp
CAD Forums => CAD General => Topic started by: ronjonp on April 07, 2004, 10:39:11 AM
-
[HKEY_CURRENT_USER\Software\Autodesk\AutoCAD\R15.0\ACAD-1:409\Profiles\WatermarkID\General]
"ACAD"=
The ACAD= already has search paths in it. How can I easily add a couple of paths?
Thanks,
Ron
-
Registry changes won't take effect until you restart AutoCAD.
To make permanent changes to the registry path for future sessions of AutoCAD, retrieve the path value, add the new value to the end of the retrieved value, then put the new value in the registry.
To make changes that reflect only in the current drawing, and to make them immediate..
Change the acadprefix system variable.
to update drawing local support path in LISP
(setq acadpath (getvar "acadprefix"))
(setq acadpath (strcat acadpath ";" "new path"))
(setvar "acadprefix" acadpath)
To update the registry you should probably use the registry functions in VBA....
Function RegistryValue(ByVal RegistryKey As String, ByVal RegValue As Variant, ByVal ReadWriteDelete As Long, ByVal DataType As Long)
Const VbRegDelete = 0
Const VbRegRead = 1
Const VbRegWrite = 2
Dim WSHShell As IWshShell_Class
Set WSHShell = Interaction.CreateObject("WScript.Shell")
If ReadWriteDelete = VbRegRead Then
GetRegistryValue = WSHShell.RegRead(RegistryKey)
ElseIf ReadWriteDelete = VbRegWrite Then
GetRegistryValue = WSHShell.RegWrite(RegistryKey, RegValue, DataType)
ElseIf ReadWriteDelete = VbRegDelete Then
GetRegistryValue = WSHShell.RegDelete(RegistryKey)
End If
End Function
I am not sure about the data type of "DataType" I have not had the opportunity to research it.
-
Thanks Keith! :D
-
I edited the post, so you might want to reload it
-
kieth,
if I'm using this lsp
(defun c:AHLCTBD ()
(setq prefs(vla-get-preferences (vlax-get-acad-object))
filePrefs(vla-get-files prefs))
(vla-put-printerstylesheetpath filePrefs "M:\\_Cad Support\\AHL_CTB")
(vla-refreshplotdeviceinfo
(vla-get-activelayout
(vla-get-activedocument
(vlax-get-acad-document))))
(alert "Notice:\nYou are now using AHL standard CTB's")
(princ)
)
What could I add to it so that the current drawing will read it. Update the registry in current drawing?
:-)