Pallette initial location defaults to left side of screen, can I force right?

Started by Hypersonic, November 30, 2009, 10:33:32 AM

Previous topic - Next topic

Hypersonic

I.e. is it possible to make them open and dock on the right side instead?
Thanks!

owenwengerd

It's possible, but you would need to write the desired settings into the current user's profile manually before loading the palette.
Owen Wengerd (Outside The Box) / ManuSoft

Hypersonic


Is it possible to use this to get the screen size ,then position from there?
(getvar "screensize")

Fred Tomke

Sure, you should recalculate it then.
By default, the palette will be docked at left side (it's my experience).

Fred
Fred Tomke
Dipl.-Ing. (FH) Landespflege

[ landscaper - landscape developer - digital landscape and urban design]

Hypersonic

I tried, could not get the pallet to reposition or go to a position on showing it....

If you can get it undocked, then you can get the position to change... but I can't figure out how to make that happen.....

So I just changed it to a modeless form, it will have to do......

owenwengerd

You do know that the palette position is saved and restored between AutoCAD sessions, right? You only have to set it once, then it will stay where you put it after you close AutoCAD and restart.
Owen Wengerd (Outside The Box) / ManuSoft

Hypersonic

I did not.....hmm let me try it again. I thought it kept jumping to the left even after moving it....

Fred Tomke

Hello, I have figured out that the following code was added to the following file when I've opened my palette the first time.

C:\Users\MyLoginName\AppData\Roaming\Autodesk\AutoCAD Map 3D 2010\R18.0\deu\Support\Profiles\MyProfile\Profile.aws


<Tool CLSID="{AB3492EE-987D-4F0C-BDD0-28D54E6F41A8}">
    <CAdUiDockControlBar Orientation="59420" AllowDocking="1">
      <FloatInfo Left="50" Top="50" Width="664" Height="448"/>
      <DockInfo Left="-4" Top="172" Width="664" Height="818" MRUDockID="59420"/>
    </CAdUiDockControlBar>
    <CAdUiPaletteSet/>
</Tool>


If I make the palette floating this section is changig to


<Tool CLSID="{AB3492EE-987D-4F0C-BDD0-28D54E6F41A8}">
  <CAdUiDockControlBar Orientation="-1" AllowDocking="1">
    <FloatInfo Left="136" Top="211" Width="699" Height="216"/>
    <DockInfo Left="-4" Top="172" Width="664" Height="818" MRUDockID="59420"/>
  </CAdUiDockControlBar>
  <CAdUiPaletteSet/>
</Tool>


Where can I get the CLSID from? Is it saved into to odcl-file? I cannot find it in the registry. Or is it generated randomly when calling the palette the first time?

Fred
Fred Tomke
Dipl.-Ing. (FH) Landespflege

[ landscaper - landscape developer - digital landscape and urban design]

Fred Tomke

Hi, I've found out that all the OpenDCL palettes have no attributes in the CAdUiPaletteSet child. Do we have any chance to change? Then it would be possible to adress the key in the aws-file.

Fred
Fred Tomke
Dipl.-Ing. (FH) Landespflege

[ landscaper - landscape developer - digital landscape and urban design]

Fred Tomke

Quote from: Fred Tomke on December 01, 2009, 10:31:18 AM
[...]I've found out that all the OpenDCL palettes have no attributes in the CAdUiPaletteSet child.[...]

The transparency settings are usually saved there. When I change the transparency settings in AutoCAD, the settings are not saved into the aws-file. But I can change it by hand by adding code manually to the aws-file:
<CAdUiPaletteSet ActivePaletteIndex="&quot;0&quot;" TitleBarLocation="0" AutoRollup="0"
Name="Layerthemen-Manager" Style="46" Opacity="55" RolloverOpacity="90" Visible="1"/>

In that case these settings are used after next start of AutoCAD. But if I change the setting then to other values they're still not saved into the aws-file.
I'm afraid there is not solution to find out the current palette settings, is it?

Fred
Fred Tomke
Dipl.-Ing. (FH) Landespflege

[ landscaper - landscape developer - digital landscape and urban design]

Fred Tomke

Hi, since my hotel suite has no TV I used the time before sleeping to play around with the initial settings of palette and I've found out that you can exchange the settings of your palette - if you know the GUID of it.

<Tool CLSID="{AB3492EE-987D-4F0C-BDD0-28D54E6F41A8}">
 <CAdUiDockControlBar Orientation="59422" AllowDocking="1">
   <FloatInfo Left="228" Top="198" Width="824" Height="408" />
   <DockInfo Left="-4" Top="768" Width="1429" Height="224" MRUDockID="59422" />
 </CAdUiDockControlBar>
 <CAdUiPaletteSet ActivePaletteIndex="1" TitleBarLocation="1" AutoRollup="1"
    Name="Layerthemen-Manager" Style="46" Opacity="55" RolloverOpacity="100" Visible="0" />
</Tool>


CLSID = Object-ID GUIID (unique for palette)

CAdUiDockControlBar: current palette state
 Orientation    = current docking state; values: -1 for floating and values from value list of enumDockingStyle
 AllowDocking    = state, if docking is allowed

FloatInfo: position and size of floating palette
 Left      = position from left edge of screen
 Top      = position from top edge of screen
 Width      = palette width
 Height   = palette height

DockInfo: position and size of docked palette
 Left      = position from left edge of screen
 Top      = position from top edge of screen
 Width      = palette width
 Height   = palette height
 MRUDockID   = docking style of docked palette (this is the place the currently floating palette will be docked at when doubleclicking the titlebar); must be identical to the value of Orientation, if palette is docked

CAdUiPaletteSet: advanced display properties
 ActivePaletteIndex   = is palette active at start of AutoCAD: 0=no; 1=yes
 TitleBarLocation   = side of titlebar of the floating palette: 0=left; 1=right
 AutoRollup      = automatic collapse: 0=no; 1=yes
 Name         = TitelBarText
 Style         = no idea
 Opacity      = transparency at OnMouseOff; values between 0 and 100; 100=completely visible
 RolloverOpacity   = transparency at OnMouseEntered; values between 0 and 100; 100=completely visible
 Visible      = is palette expanded: 0=no; 1=yes


Values for enumDockingStyle

59417 left, collapsed
59418 right, collapsed
59419 top
59420 left
59421 right
59422 bottom

I'm going to develop an function to change the settings in the aws file. Stay tuned!  ;)

Fred
Fred Tomke
Dipl.-Ing. (FH) Landespflege

[ landscaper - landscape developer - digital landscape and urban design]

owenwengerd

Good work, Fred. The GUID for control bars is generated when the new form is created in Studio, and saved in the .odcl file, but it is not exposed. I look forward to seeing what you come up with here. It may be necessary to expose that GUID somehow.
Owen Wengerd (Outside The Box) / ManuSoft

Fred Tomke

And here it is:
with the function I attached you can create or edit the aws-file for the current profile. If the form already exist in the aws-file the code will update it with the values you give. If the form does not exist, it will appended to the list.

It requires MSXML. But since AutoCAD installs MSXML at its own installation progress it should be available. It was the first time that I tried working with MSXML. Until now I only worked with ChilkatXML. I like ChilkatXML much more.

And now I pour water in your glass of wine: You can set the parameters to the aws-file with this code. But after closing AutoCAD this updated file will be overwritten by AutoCAD with its last settings - but not with mine  :'(.

Have a try with it. I'll be back on thursday.

Fred
Fred Tomke
Dipl.-Ing. (FH) Landespflege

[ landscaper - landscape developer - digital landscape and urban design]

owenwengerd

I discovered that adding a temporary palette tab to the palette when it saves its state causes the <CAdUiPaletteSet> node to be written correctly. For Alpha 23 I've added code to add a temporary palette for his purpose. Unfortunately I haven't yet figured out how to force the palette state to be written during (dcl_form_close). So far it only gets written when AuoCAD is closed while the palette is visible.
Owen Wengerd (Outside The Box) / ManuSoft

velasquez

Quote from: Fred Tomke on December 01, 2009, 10:31:18 AM
Hi, I've found out that all the OpenDCL palettes have no attributes in the CAdUiPaletteSet child. Do we have any chance to change? Then it would be possible to adress the key in the aws-file.

Fred

Hello Fred, 
 
What program you this using to edit the file .aws shown in your image?