Thanks Keith.....with that said:
;;;;____________________________________________________________________________________________
;;;;SETS XREF ATTACH DIALOG, ETRANSMIT, AND SHEET MANAGER START FOLDER TO CURRENT DRAWING PATH
;;;;____________________________________________________________________________________________
(defun writereg (/ DP HKCU key regpath)
(if (= (getvar 'dwgtitled) 1)
(progn
(setq DP (getvar 'dwgprefix)
HKCU (strcat "HKEY_CURRENT_USER\\" (vlax-product-key))
key (strcat HKCU
"\\Profiles\\"
(getvar 'cprofile)
"\\Dialogs\\"
)
)
(setq regpath (strcat HKCU "\\ETransmit\\Setups\\Standard\\"))
(vl-registry-write regpath "DestFolder" DP)
(setq regpath (strcat key "XattachFileDialog"))
(vl-registry-write regpath "InitialDirectory" DP)
(setq regpath (strcat key "XrefFileDialog"))
(vl-registry-write regpath "InitialDirectory" DP)
(setq regpath (strcat key "Sheet Set Wizard"))
(vl-registry-write regpath "BrowseForLayoutsPath" DP)
(setq regpath (strcat key "Sheet Set Wizard"))
(vl-registry-write regpath "SheetSetCreatePath" DP)
(setq regpath (strcat key "eTransAddFile"))
(vl-registry-write regpath "InitialDirectory" DP)
(setq regpath (strcat key "SSMNavigator"))
(vl-registry-write regpath "OpenSheetSetPath" DP)
(setq regpath (strcat key "SSMNavigator"))
(vl-registry-write regpath "ImportLayoutsAsSheetsPath" DP)
)
)
)
(writereg)
(vlr-command-reactor nil '((:vlr-commandWillStart . startCommand)))
(defun startCommand
(calling-reactor startcommandInfo / thecommandstart)
(setq thecommandstart (nth 0 startcommandInfo))
(cond
((= thecommandstart "XREF") (writereg))
((= thecommandstart "ETRANSMIT") (writereg))
((= thecommandstart "NEWSHEETSET") (writereg))
)
)