TheSwamp
Code Red => .NET => Topic started by: jgr 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.
-
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
-
There are a few examples of this somewhere in this forum, have a quick search
-
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.
-
have a look at this thread http://www.theswamp.org/index.php?topic=15939.0
-
There are a few examples of this somewhere in this forum, have a quick search
Sorry. But before asking: I have searched.
-
Thanks, and sorry
always answer later. To write I need a translator
-
did you catch this?
...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.
-
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...
-
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.
-
(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.
-
maybe can you use IExtensionApplication to launch your pallet instead of a command? You can also test the visible state as LE mentions
-
No he usado las paletas en un buen rato, pero creo que es algo asi (que ya te habian explicado antes):
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.
-
Thank you all.
Tomorrow proves all your options. I need some sleep.
Thanks.
-
I need some sleep.
an all night coder :-D
-
Solved
It seems that, in this case, the name of palleteset must be the same as the command that displays palette
Olde Code
_ps = New Autodesk.AutoCAD.Windows.PaletteSet("Navegador Web", New Guid(PSGGUID))
New Code
_ps = New Autodesk.AutoCAD.Windows.PaletteSet("WEBBWR", New Guid(PSGGUID))
<Autodesk.AutoCAD.Runtime.CommandMethod("HNGRWEBBWR", "WEBBWR", CommandFlags.Transparent)> _
Public Shared Sub ShowWebBrowserPalette()
_ps.Visible = True
End Sub
Full source:
-
Hmmm...from memory, as palettes are modeless, if they're executed from a command, that command should have CommandFlags.Session...