Community
AutoCAD Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

What is the best practice for changing/updating support folders automatically

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
Jonathan3891
250 Views, 4 Replies

What is the best practice for changing/updating support folders automatically

I have a couple questions in regards to the proper setup and implementation of an Enterprise Workspace.

 

1) What is the best practice for changing/updating support folders automatically, without me having to manually delete the profile on every users machine?

2) Also, what is the best practice to automatically load enterprise cui menu's, toolbars, etc. without having to manually edit the CUI and load those items? 

 

I created a profile to load all the required support folders that's switched via a company specific shortcut.

There are times where I need to update a folder for whatever reason, so I export the profile so it updates. But the updates aren't automatically applied whenever someone launches AutoCAD. For this method to work, the profile has to be deleted, then when the application is relaunched it will update.

 

 

 

 

 

[ The post and the subject line of this post has been edited for clarity by @pendean Original: Enterprise Workspace ]


Jonathan Norton
Blog | Linkedin
4 REPLIES 4
Message 2 of 5
pendean
in reply to: Jonathan3891

For... which software? You opted to post in a forum that is never going to get the eyeballs you crave @Jonathan3891
Message 3 of 5
Simon_Weel
in reply to: Jonathan3891

Guess this is AutoCAD you're talking about? Changing support paths, loading the correct menu's etc. is done by LISP routines in my environment. All corporate stuff is on a network share, including acad.lsp. This file is loaded / executed automatically when you start AutoCAD, so it's the ideal place for the aforementioned things.

Message 4 of 5
Jonathan3891
in reply to: Jonathan3891

Yes, this is for AutoCAD as I mentioned in my OP.


Jonathan Norton
Blog | Linkedin
Message 5 of 5
Simon_Weel
in reply to: Jonathan3891

To check if the correct profile is loaded, I use this code in acad.lsp:

 

(if (/= (getenv "al_prof") "1")
 (progn
  (setq profielnaam   (strcat "AUTOCAD " versie " KB")
        profielpad    (strcat acadsuppad "PROFILES\\")
        acadprofiles  (vla-get-profiles (vla-get-preferences (vlax-get-acad-object)))
        actiefprofiel (strcase (vla-get-activeprofile acadprofiles))
  ) ;_ end of setq
  (vlax-invoke-method acadprofiles 'getallprofilenames 'profiellijst)
  (setq profiellijst (vlax-safearray->list profiellijst)
        profiellijst (mapcar '(lambda (lijstchangecase) (strcase lijstchangecase)) profiellijst)
  ) ;_ end of setq
  ;;
  ;; KB Profiel laden indien niet aanwezig
  (if (not (member profielnaam profiellijst))
   (if (findfile (strcat profielpad profielnaam ".ARG"))
    (progn
     (vlax-invoke-method
      acadprofiles
      'importprofile
      profielnaam
      (strcat profielpad profielnaam ".ARG")
      :vlax-true
     ) ;_ end of vlax-invoke-method
     (vla-put-activeprofile acadprofiles profielnaam)
     (setq herstart (open (strcat (getenv "Temp") "\\herstart.cmd") "w"))
     (write-line "@echo off" herstart)
     (write-line "set slp=sleep.exe" herstart)
     (write-line ":check_acad" herstart)
     (write-line "%slp% 1" herstart)
     (write-line "qprocess acad.exe" herstart)
     (write-line "if %errorlevel%==0 goto check_acad" herstart)
     (write-line (strcat "start \"Herstart AutoCAD\" \"" pad_lokaal "acad.exe\"") herstart)
     (close herstart)
     (alert
      "AutoCAD gebruikt nog niet de juiste configuratie.\n\nKlik OK om AutoCAD af te sluiten en opnieuw te starten.\nDe configuratie wordt dan bijgewerkt."
     ) ;_ end of alert
     (dos_command (strcat (getenv "Temp") "\\herstart.cmd") 3)
     (command-s "quit" "no" "")
     (exit)
    ) ;_ end of progn
    (meldingtekst (strcat "Kan bestand " profielpad profielnaam ".ARG niet vinden?"))
   ) ;_ end of if
  ) ;_ end of if
  ;;
  ;; Melding geven als KB Profiel niet actief is
  (if (/= profielnaam actiefprofiel)
   (if (member profielnaam profiellijst)
    (meldingtekst
     (strcat
      "Profiel '"
      profielnaam
      "' niet actief.\n\nMaak het profiel actief via 'Options > tab Profile'.\nStart AutoCAD daarna opnieuw om de instellingen door te voeren.\n--------------------------------------------------------------------------------"
     ) ;_ end of strcat
    ) ;_ end of meldingtekst
    (meldingtekst (strcat "Profiel '" profielnaam "' niet aanwezig!"))
   ) ;_ end of if
  ) ;_ end of if
 ) ;_ end of progn
) ;_ end of if

 

Variable names etc. are in Dutch.

 

And this code takes care of the Support path:

 

(setq suppad (strcat (vl-string-right-trim "\\" acaduserpad)
                     ";"
                     acadsuppad
                     "apps;"
                     acadsuppad
                     "support;"
                     userprofilepad
                     "support;"
                     acadsuppad
                     "cot;"
                     acadsuppad
                     "Derden/TEC/Contents;"
                     acadsuppad
                     "fonts;"
                     pad_lokaal
                     "Express"
             ) ;_ end of strcat
) ;_ end of setq
(if (/= (strcase (vla-get-supportpath paden)) (strcase suppad))
 (vla-put-supportpath paden suppad)
) ;_ end of if

 

 

With this method, you can specify anything you want, making a predefined profile obsolete.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Forma Design Contest


AutoCAD Beta