Jump to content

Recommended Posts

Posted

Hello everybody,

 

Once again I have gotten myself into a big headache: somehow I allways seem to come up with ideas that cannot be done for real. So maybe if I explain what I want to achieve you guys know a way how to go about it. Or at least together we might come up with some alternatives.

 

I am using a lot of toolpalettes wich are "splitted" in a few "disciplines". Like the first is "electrical" the second is "plumbing"... etc.

 

What I did: create a folder "Palettes" in "program files" with the subfolders "Electric" and "Plumbing" etc.

By macro (out of a toolbar) I switch the TOOLPALETTEPATH:

 

^C^C^P(command "ToolPalettesClose" "*_toolpalettepath" (strcat (getenv "programfiles") "//Palettes/Plumbing/") "Toolpalettes")

 

Now this works great... but there are some problems wich cannot be fixed. One big problem is that the "view options" are not saved / stored. So if the "view option" is set differend than default it is set back to default once you execute the macro.

 

Only this is reason enough for me to seek for another way.

 

Also the use of toolpalette groups: this way it is not possible to "connect" one palette to different groups for only the toolpalettes from the current toolpalettepath are visible.

 

Hmpff... :x

 

Now I thought I'd do it all over again, in a way it will suit my need: through a simle "appload" I want to load / set / import or whatever it takes to set it the way I want.

 

I want it to contain toolpalettegroups so with the command TPNAVIGATE I can make my "splitted disciplines" again. The changing of the toolpalettepath might not be needed anymore..(?).

 

All of this in one lisp file so all I need to to to setup other workstations is install (extract) my files to the dedicated folder and make one "appload". Restart AutoCAD and here we go.

 

I am sure this might sound a bit overkill but it really gets to me.

 

Maybe there is someone that understands my problem. And if I am lucky there might even be someone that has a solution for this.

 

Any help, ideas or other ways to approach my goal are very appreciated, as allways, on this great forum.8)

 

ps.: I have been here but since it got "lisp" related I repost in the customize section.

Posted
I switch the TOOLPALETTEPATH:

 

 

^C^C^P(command "ToolPalettesClose" "*_toolpalettepath" (strcat (getenv "programfiles") "//Palettes/Plumbing/") "Toolpalettes")

 

Ok, I know an alternative to changing the toolpalettes paths through VL.

(defun s::startup ()
(command "toolpalletesclose")
(setq files (vla-get-files
(vla-get-preferences
(vlax-get-acad-object))))
(Setq progfiles (getenv "programfiles"))
(setq tppath (vla-put-toolpalettepath files
(strcat progfiles "[url="file://palettes//Plumbing"]\\Palettes\\Plumbing[/url];"
progfiles "[url="file://palettes//Electrical"]\\Palettes\\Electrical[/url];"
progfiles "[url="file://palettes//Mechanical"]\\Palettes\\Mechanical[/url]")))
(princ)
)
;;you can put multiple paths just seperate with, ';' (don't end with it!)
(defun C:plumpal ()
(Command "tpnavigate" "Group" "Plumbing")
(princ)
)
(defun C:elecpal ()
(Command "tpnavigate" "Group" "Electrical")
(princ)
)
(defun C:mechpal ()
(Command "tpnavigate" "Group" "Mechanical")
(princ)
)
;Maybe a button for these, maybe even an if toggle?

 

I don't know if that is going to help, but i am going to bed.

 

Matt

Posted

Hi Matt,

 

Thanks for the reply!

This methode is part of how I use the setup now so I am familiar with it. BUt again thanks for your time / reaction!!

 

Regards,

MarcoW.

Posted

using tpnavigate in the code by harrison-matt, assumes that the Palettes Group(s) have been imported in the first place ? I think this is the sticking point ?

Posted
using tpnavigate in the code by harrison-matt, assumes that the Palettes Group(s) have been imported in the first place ? I think this is the sticking point ?

 

Yes NBC this is exactly what the problem is!

  • 4 months later...

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...