Jump to content

Recommended Posts

Posted


;;; as function with path hard coded
(defun C:AddToolPalettePath ( / _pimp pFiles CurToolPath NetToolPath)
  (vl-load-com) (defun _pimp (s) (strcase (vl-string-trim " ;\\" (vl-string-translate "/" "\\" s))))
  (setq pFiles (vla-get-files (vla-get-preferences (vlax-get-acad-object))))
  (setq CurToolPath (_pimp (vla-get-ToolPalettePath pFiles)))
  (setq NetToolPath (_pimp "I:\\_CAD STANDARDS\\100 - CAD SUPPORT FILES\\200 - SUPPLEMENTARY FILES\\TOOL PALETTES"))
  (if (not (vl-string-search NetToolPath CurToolPath))
    (vla-put-toolPalettePath pFiles (strcat CurToolPath ";" NetToolPath)))
  (princ)
)

;;; or as subfunction with argument :
;;; (_AddToolPalettePath "I:\\_CAD STANDARDS\\100 - CAD SUPPORT FILES\\200 - SUPPLEMENTARY FILES\\TOOL PALETTES")
(defun _AddToolPalettePath ( $tp / _pimp pFiles CurToolPath NetToolPath)
  (vl-load-com) (defun _pimp (s) (strcase (vl-string-trim " ;\\" (vl-string-translate "/" "\\" s))))
  (setq pFiles (vla-get-files (vla-get-preferences (vlax-get-acad-object))))
  (setq CurToolPath (_pimp (vla-get-ToolPalettePath pFiles)))
  (setq NetToolPath (_pimp $tp))
  (if (not (vl-string-search NetToolPath CurToolPath))
    (vla-put-toolPalettePath pFiles (strcat CurToolPath ";" NetToolPath)))
  (princ)
)

😴

  • Like 1
Posted

You guys are awesome - thank you for explaining.  I spoke to another coder who refreshed my memory on how crappily Autodesk manages toolpalettes (i.e. the groups are stored in the registry via the profile and that a restart is required for changes to take effect).  I'd like to find the guys who programmed it this way and backhand them a few times. 

Anyway, the suggestion I heard from him and have seen floating around online is it to have buttons in toolbar/ribbon to toggle the ToolPalette Path between the User's default and the network Palettes so then this group crap is irrelevant.  That's something to tackle for another day though.

 

P.S. 😆 the pimp function...   

 

 

  • 4 years later...
Posted

Is there a way to to do the same thing to the Authoring Tool Palettes Location?

Haven't been able to find where it is located in the vla object acad/preferences/files or as a system variable like the tool palettes location can be updated/changed.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...