dynamic / nested palettes

dynamic / nested palettes

Anonymous
Not applicable
688 Views
1 Reply
Message 1 of 2

dynamic / nested palettes

Anonymous
Not applicable

Hello,

 

First post in.. ages.. so forgive me if it's been covered but having trouble finding a solution that meets my needs..

 

(aCAD 17  windows user) I'm currently working on an ish-wide set of dynamic blocks for a bespoke kitchen/furniture manufacturers, setting up tool palettes etc plus various fairly basic lisp routines etc. All fine- got atc files, block references etc up on our server which all users on our vpn default to (same with lisp routines, plot styles, .dwt's etc). Concerned about drowning in palettes and would like to clean things up on the user side - most of the designers/draftsmen here use acad (v17 windows) like a chalkboard so.. baby steps. 

 

As i understand it there is not a native method for nesting/producing sub-levels in tool palettes - is this correct? 

 

I think what i need for a start is a way to generate different tool palette sets more dynamically, i.e based on different filters etc. I can't find anything on whether this is possible within autolisp, or whether it is there is a way to manipulate atc files or just xml generally (besides doing my own string manipulation thing) ?

 

Another way round could be to handle all of that separately and just have a lisp routine that makes some sort of request with arguments x,y.. etc and then assigns the response to the tool palette directory.... ? I think all the xml stuff and interfacing with the set up would be pretty straightforward in python - i've been playing around with the palette atc schema for a while and the basics at least seem pretty straightforward. Wondered if i could just set up a little controller on the server - i've seen some examples of http requests in in autolisp so imagining that this might be feasible?

 

Anyway - as you can see i'm in a muddle... even just a really broad idea of what direction to look in for this sort of thing would be immensely helpful - I'm a big fan of learning on the job.

 

 

Cheers,

 

Alex

 

0 Likes
689 Views
1 Reply
Reply (1)
Message 2 of 2

Jonathan.Trostad
Advocate
Advocate

You can load tool pallets via LISP with this:

;;code from Gary Fowler

(defun ARCH:ToolPalettesPath (PATH)
 (VLA-PUT-ToolPalettePath (vla-get-Files (vla-get-Preferences (vlax-get-acad-object))) PATH)
 (if (= (getvar "tpstate") 1)(command "ToolPalettesClose")(command "ToolPalettes")) )

I haven't used it recently, but if I remember correctly, what you can do is have your tool palettes in a series of different folders, and then fire this snippet of code off to switch folders into the set of palettes you want to use. I don't recall for sure if you need to turn them off first or not, so you may need to experiment there

0 Likes