Author Topic: .net paletteset versus CAdUiPaletteSet  (Read 6180 times)

0 Members and 1 Guest are viewing this topic.

jgr

  • Guest
.net paletteset versus CAdUiPaletteSet
« on: September 23, 2010, 08:04:32 PM »
Sorry, my current Questions  += 1

From objectarx:
Windows derived from CAdUiDockControlBar—which includes CAcUiDockControlBar, CAdUiPaletteSet, and CAcTcUiToolPaletteSet—can register themselves using the global function AdUiRegisterTool(). Registered windows that were visible when a session of AutoCAD closed will be automatically started in the next session and will be saved and restored in workspaces.

Command
 REG_SZ
 Command to invoke the window
 ...

I use a guid...commands...REG_SZ....  but does not work. The window does not start automatically at the next session.

Thanks.

Jeff H

  • Needs a day job
  • Posts: 6144
Re: .net paletteset versus CAdUiPaletteSet
« Reply #1 on: September 23, 2010, 08:33:18 PM »
Not familiar with CAdUiPaletteSet


but this seems to work for me
If your app is demand loaded or when you NetLoad
jgrPS = new Autodesk.AutoCAD.Windows.PaletteSet("jgr Palette", new Guid("24971F58-9504-4495-AF96-44389B271506"));

I sure you know about the Create Guid on tool Menu thought I mentioned it though

It's Alive!

  • Retired
  • Needs a day job
  • Posts: 8659
  • AKA Daniel
Re: .net paletteset versus CAdUiPaletteSet
« Reply #2 on: September 23, 2010, 08:41:47 PM »
There are a few examples of this somewhere in this forum, have a quick search

jgr

  • Guest
Re: .net paletteset versus CAdUiPaletteSet
« Reply #3 on: September 23, 2010, 08:42:41 PM »
thanks for replying.
Yes: my app is demand loaded on Start Up and i use:
new Guid(...

Next weekend will send the full code

Thank you very much.

It's Alive!

  • Retired
  • Needs a day job
  • Posts: 8659
  • AKA Daniel
Re: .net paletteset versus CAdUiPaletteSet
« Reply #4 on: September 23, 2010, 08:47:52 PM »

jgr

  • Guest
Re: .net paletteset versus CAdUiPaletteSet
« Reply #5 on: September 23, 2010, 08:50:53 PM »
There are a few examples of this somewhere in this forum, have a quick search

Sorry. But before asking: I have searched.

jgr

  • Guest
Re: .net paletteset versus CAdUiPaletteSet
« Reply #6 on: September 23, 2010, 08:54:46 PM »
Thanks, and sorry
always answer later. To write I need a translator

It's Alive!

  • Retired
  • Needs a day job
  • Posts: 8659
  • AKA Daniel
Re: .net paletteset versus CAdUiPaletteSet
« Reply #7 on: September 23, 2010, 08:54:55 PM »
did you catch this?

Quote
...Have you ever wondered how AutoCAD remembers
where PalletteSets were docked, the size and position they
had in the last session?

It stores that information in a file, which is located in:

C:\Documents and Settings\<YourLoginName>\Application Data\Autodesk\AutoCAD 200X\RXX.x\enu\Support\Profiles\FixedProfile.aws

Find the file, and make a copy of it, and change the
extension of the copy to .XML and open it in IE or
another XML viewer, and take a look.

You'll see that tools are keyed to the GUIDs you
supply to the PalleteSet's constructor. If you don't
supply a GUID the I'm pretty sure that AutoCAD will
not persist the state of your PaletteSet.


maybe have a look at this file and see it looks correct.

jgr

  • Guest
Re: .net paletteset versus CAdUiPaletteSet
« Reply #8 on: September 23, 2010, 09:07:39 PM »
Thanks but my problem is not the size and position

According ObjectARX:
Registered windows that were visible when a session of AutoCAD closed will be automatically started in the next session.

And my window does not start in the folowing session.

Language is a big problem for me. Sorry, sorry...

LE3

  • Guest
Re: .net paletteset versus CAdUiPaletteSet
« Reply #9 on: September 23, 2010, 09:33:26 PM »
Language is a big problem for me. Sorry, sorry...

Creo que hablas Español (If not sorry about that, got that impression) - pero tu Ingles esta muy bien, por eso no te preocupes, la mayoria te va a entender, de eso no tengas duda.

Saludos.

jgr

  • Guest
Re: .net paletteset versus CAdUiPaletteSet
« Reply #10 on: September 23, 2010, 09:53:40 PM »
(Gracias LE, aunque creo que no es asi ... google trans... etc)
Yes, i (only) speak spanish.

I use CommandFlags.Modal In CommandMethod. It may be that the problem?

Thanks.


« Last Edit: September 23, 2010, 10:00:42 PM by jgr »

It's Alive!

  • Retired
  • Needs a day job
  • Posts: 8659
  • AKA Daniel
Re: .net paletteset versus CAdUiPaletteSet
« Reply #11 on: September 23, 2010, 10:03:55 PM »
maybe can you use IExtensionApplication to launch your pallet instead of a command? You can also test the visible state as LE mentions
« Last Edit: September 23, 2010, 10:15:47 PM by __declspec »

LE3

  • Guest
Re: .net paletteset versus CAdUiPaletteSet
« Reply #12 on: September 23, 2010, 10:08:35 PM »
No he usado las paletas en un buen rato, pero creo que es algo asi (que ya te habian explicado antes):
Code: [Select]
       private static PaletteSet myPaletteSet;

        [CommandMethod("YourPalette")]
        static public void cmd_palette()
        {
            if (myPaletteSet == null)
            {
                myPaletteSet = new PaletteSet("Mi Paleta", new Guid("BF783B3B-8523-4e65-A6D3-72FE202C30FD"));

                // coloca el codigo para la pestaña aqui
            }

            myPaletteSet.Visible = true;
        }

(Gracias LE, aunque creo que no es asi ... google trans... etc)
Yes, i (only) speak spanish.

I use CommandFlags.Modal In CommandMethod. It may be that the problem?

Thanks.



« Last Edit: September 23, 2010, 10:12:01 PM by LE »

jgr

  • Guest
Re: .net paletteset versus CAdUiPaletteSet
« Reply #13 on: September 23, 2010, 10:19:21 PM »
Thank you all.
Tomorrow proves all your options. I need some sleep.

Thanks.

It's Alive!

  • Retired
  • Needs a day job
  • Posts: 8659
  • AKA Daniel
Re: .net paletteset versus CAdUiPaletteSet
« Reply #14 on: September 23, 2010, 10:28:31 PM »
I need some sleep.

an all night coder   :-D