Or a docmanager reactor, e.g.
Code:
(defun c:SaveProfile2DWG (/ profname)
(if (setq profname (vla-put-ActiveProfile (vla-get-Profiles (vla-get-Preferences (vlax-get-acad-object)))))
(vlax-ldata-put "SwitchProfiles" "Name" profname)
)
(princ)
)
(defun CheckAndSetProfile (calling-reactor commandInfo / profname)
(if (setq profname (vlax-ldata-get "SwitchProfiles" "Name"))
(vla-put-ActiveProfile (vla-get-Profiles (vla-get-Preferences (vlax-get-acad-object))) profname)
)
)
(vlr-docmanager-reactor "SwitchProfiles" '((:vlr-documentToBeActivated . CheckAndSetProfile)))
You have to run the SaveProfile2DWG command to save the current profile as the DWG's default inside the DWG (I've used the ldata named dictionary as it's the easiest way). Then check which name was saved in the drawing (if at all) every time a drawing is activated. Switch if name was saved - otherwise do nothing.
Just remember that each of the users need to have the same profile names setup - as the name is now stored inside the DWG and not "linked" to a profile type.