Author Topic: Vlisp to control palette icon view  (Read 2084 times)

0 Members and 1 Guest are viewing this topic.

David Hall

  • Automatic Duh Generator
  • King Gator
  • Posts: 4075
Vlisp to control palette icon view
« on: July 22, 2014, 04:26:19 PM »
Is there a way to control Palette view via vlisp?  I have this code
Code: [Select]
(defun c:PL1 ()
  (vl-load-com)
  (setq acadObj (vlax-get-acad-object))
  (setq prefObj (vlax-get-property acadObj 'Preferences))
  (setq filesTabObj (vlax-get-property prefObj 'Files))
  (setq palPath (vlax-get-property filesTabObj 'ToolPalettePath))
  (setq palPath "c:\\tepsupport\\palettes")
  (vlax-put-property filesTabObj 'ToolPalettePath palPath)
)
that I use to switch palette paths, but each time, I have to manually right-click and choose View-Options and then Icon with text.  Anyway to automate this?
Everyone has a photographic memory, Some just don't have film.
They say money can't buy happiness, but it can buy Bacon and that's a close second.
Sometimes the question is more important than the answer. (Thanks Kerry for reminding me)

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Vlisp to control palette icon view
« Reply #1 on: July 22, 2014, 05:41:56 PM »
Hi David.

I can't recall seeing anything to help with setting the Tool Palette panes.
Not saying you can't though ...

added : It wouldn't surprise me if those settings are in an XML file somewhere.
« Last Edit: July 22, 2014, 05:46:57 PM by Kerry »
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

David Hall

  • Automatic Duh Generator
  • King Gator
  • Posts: 4075
Re: Vlisp to control palette icon view
« Reply #2 on: July 23, 2014, 04:46:34 PM »
What is frustrating is when I switch the palette path, it resets to the big list that is worthless.  Does Autodesk think we have such huge monitors that we only need 1 icon per line?
Everyone has a photographic memory, Some just don't have film.
They say money can't buy happiness, but it can buy Bacon and that's a close second.
Sometimes the question is more important than the answer. (Thanks Kerry for reminding me)

David Hall

  • Automatic Duh Generator
  • King Gator
  • Posts: 4075
Re: Vlisp to control palette icon view
« Reply #3 on: July 28, 2014, 11:48:04 AM »
Well I haven't been able to find these settings anywhere.  Biggest problem is trying to figure out what to look for in a key word.
Everyone has a photographic memory, Some just don't have film.
They say money can't buy happiness, but it can buy Bacon and that's a close second.
Sometimes the question is more important than the answer. (Thanks Kerry for reminding me)

roy_043

  • Water Moccasin
  • Posts: 1895
  • BricsCAD 18
Re: Vlisp to control palette icon view
« Reply #4 on: July 29, 2014, 04:56:53 AM »
I don't know if this helps (I use BricsCAD):
BC uses .btc files for toolpalettes. I believe that AC uses the .atc extension here.
Inside .btc files there is a section like this:
Code: [Select]
  <PaletteUI>
    <Image>16</Image>
    <Style>1</Style>
    <ToolOrder>
      <Tool ID="016AE9A7-D694-4674-94AD-8D2AA13922AE"/>
      <Tool ID="59C4FE7D-B1AB-4E7C-A41C-16916C09AF10"/>
      <Tool ID="84B3E66C-A493-42C3-949A-528764AFFD71"/>
    </ToolOrder>
  </PaletteUI>
The 'Image' and 'Style' settings store the view options.

David Hall

  • Automatic Duh Generator
  • King Gator
  • Posts: 4075
Re: Vlisp to control palette icon view
« Reply #5 on: August 04, 2014, 12:43:20 PM »
Many thanks, I will look for that now.  Question though, and I know this is a dumb question, but why can Autocad not use the setting that is there instead of resetting to what I don't want anytime a change is made?
Everyone has a photographic memory, Some just don't have film.
They say money can't buy happiness, but it can buy Bacon and that's a close second.
Sometimes the question is more important than the answer. (Thanks Kerry for reminding me)