<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Programatically Activating my ToolPalette in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/programatically-activating-my-toolpalette/m-p/1800147#M80035</link>
    <description>I see - but I am not creating the palettes programatically.&lt;BR /&gt;
They are imported from exported palettes.&lt;BR /&gt;
So my question is how to I get a palette reference from a set of existing palettes.&lt;BR /&gt;
Basicly I have a palette called "SD Commands" which is one of 45 palettes I have imported.&lt;BR /&gt;
Is there a way to get it?&lt;BR /&gt;
I've tryed ToolPalette Manager.Find(Guid) which gives me a 'Catalog Item' which I tryed to cast to Palette. This failed.&lt;BR /&gt;
&lt;BR /&gt;
Can I walk through existing palletes?&lt;BR /&gt;
&lt;BR /&gt;
Thanks&lt;BR /&gt;
CM</description>
    <pubDate>Thu, 09 Nov 2006 12:37:55 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2006-11-09T12:37:55Z</dc:date>
    <item>
      <title>Programatically Activating my ToolPalette</title>
      <link>https://forums.autodesk.com/t5/net-forum/programatically-activating-my-toolpalette/m-p/1800141#M80029</link>
      <description>Hi All,&lt;BR /&gt;
I've installed my product which loads a few toolpalettes &amp;amp; toolpalettesets. On first start I would like to open the toolpalette to my new toolpalette in code.&lt;BR /&gt;
&lt;BR /&gt;
I can open the toolpalette by sending "TP" command, but this just opens the palette windo to the last used palette. I cannot figure out a way to 'Activate' or Focus my new toolpalette. I need to SetCurrent on it.&lt;BR /&gt;
&lt;BR /&gt;
I've tryed PaletteSet.Activete(). Fails.&lt;BR /&gt;
&lt;BR /&gt;
Any Ideas?</description>
      <pubDate>Tue, 24 Oct 2006 16:02:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/programatically-activating-my-toolpalette/m-p/1800141#M80029</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-10-24T16:02:47Z</dc:date>
    </item>
    <item>
      <title>Re: Programatically Activating my ToolPalette</title>
      <link>https://forums.autodesk.com/t5/net-forum/programatically-activating-my-toolpalette/m-p/1800142#M80030</link>
      <description>I use the following code to activate the palette from a palette set (where palette points to the instance of the palette I want to activate):&lt;BR /&gt;
[code]&lt;BR /&gt;
System.Collections.IEnumerator paletteEnum = palette.PaletteSet.GetEnumerator();&lt;BR /&gt;
for (int i = 0; paletteEnum.MoveNext(); i++)&lt;BR /&gt;
  if (((Palette)paletteEnum.Current).Name.Equals(palette.Name))&lt;BR /&gt;
  {&lt;BR /&gt;
    palette.PaletteSet.Activate(i);&lt;BR /&gt;
    break;&lt;BR /&gt;
  }&lt;BR /&gt;
[/code]&lt;BR /&gt;
&lt;BR /&gt;
As you can see Activate(int) works for me.</description>
      <pubDate>Tue, 24 Oct 2006 20:43:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/programatically-activating-my-toolpalette/m-p/1800142#M80030</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-10-24T20:43:41Z</dc:date>
    </item>
    <item>
      <title>Re: Programatically Activating my ToolPalette</title>
      <link>https://forums.autodesk.com/t5/net-forum/programatically-activating-my-toolpalette/m-p/1800143#M80031</link>
      <description>Hi Pavlos,&lt;BR /&gt;
Thanks for the information.&lt;BR /&gt;
I have a new issue that is similar.&lt;BR /&gt;
I have created a partial cui with my menus &amp;amp; toolbars.&lt;BR /&gt;
I then install it into the acad.cui by the following code...&lt;BR /&gt;
&lt;BR /&gt;
 CustomizationSection acadcui = new CustomizationSection(acad_fp);&lt;BR /&gt;
                CustomizationSection swatchdigitalcui = new CustomizationSection(swatchdigital_fp);&lt;BR /&gt;
                &lt;BR /&gt;
                if (acadcui.PartialCuiFiles.Contains(swatchdigital_fp) == false)&lt;BR /&gt;
                {&lt;BR /&gt;
                    acadcui.PartialCuiFiles.Add(swatchdigital_fp);&lt;BR /&gt;
                    acadcui.Save();&lt;BR /&gt;
                }&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
This does in face add the partial.cui into the main cui but....&lt;BR /&gt;
It does not activate-it does not add the menu to the main menus.&lt;BR /&gt;
Where I open the customize dialog, the file is listed but will only show up if I manually press 'Apply'.&lt;BR /&gt;
I've tryed RefreshWorkspace(), MakeDirty(), etc.&lt;BR /&gt;
&lt;BR /&gt;
Do you have any idea hope I can get the menu to show up programmatially without having th resort to writing them into the acad.cui directly?&lt;BR /&gt;
&lt;BR /&gt;
Thanks,&lt;BR /&gt;
CM</description>
      <pubDate>Wed, 25 Oct 2006 17:33:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/programatically-activating-my-toolpalette/m-p/1800143#M80031</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-10-25T17:33:57Z</dc:date>
    </item>
    <item>
      <title>Re: Programatically Activating my ToolPalette</title>
      <link>https://forums.autodesk.com/t5/net-forum/programatically-activating-my-toolpalette/m-p/1800144#M80032</link>
      <description>I add my custom menus with the following code (it adds a submenu with some menuitems under the dimension menu).&lt;BR /&gt;
[code]&lt;BR /&gt;
AcadApplication app = (AcadApplication)Autodesk.AutoCAD.ApplicationServices.Application.AcadApplication;&lt;BR /&gt;
AcadMenuBar menuBar = app.MenuBar;&lt;BR /&gt;
AcadPopupMenu dimensionMenu = null;&lt;BR /&gt;
//Find the dimension menu&lt;BR /&gt;
for (int i = 0; i &amp;lt; menuBar.Count; i++)&lt;BR /&gt;
  if (menuBar.Item(i).TagString.Equals("ID_MnDimensi"))&lt;BR /&gt;
    dimensionMenu = menuBar.Item(i);&lt;BR /&gt;
if (dimensionMenu != null)&lt;BR /&gt;
{&lt;BR /&gt;
  dimensionMenu.AddSeparator(dimensionMenu.Count);&lt;BR /&gt;
  AcadPopupMenu camSubMenu = dimensionMenu.AddSubMenu(dimensionMenu.Count, "CAM Dimensions");&lt;BR /&gt;
  camSubMenu.AddMenuItem(dimensionMenu.Count, "Square", "SQUAREDIM ");&lt;BR /&gt;
  camSubMenu.AddMenuItem(dimensionMenu.Count, "Sphere Radius", "SPHERERADIUS ");&lt;BR /&gt;
  camSubMenu.AddMenuItem(dimensionMenu.Count, "Sphere Diameter", "SPHEREDIAMETER ");&lt;BR /&gt;
  camSubMenu.AddMenuItem(dimensionMenu.Count, "Key", "KEYDIM ");&lt;BR /&gt;
  camSubMenu.AddMenuItem(dimensionMenu.Count, "Leader", "LEADERDIM ");&lt;BR /&gt;
}&lt;BR /&gt;
[/code]&lt;BR /&gt;
&lt;BR /&gt;
As you can see I don't use a cui file, but the menu appears instantly.&lt;BR /&gt;
Hope I could help you.</description>
      <pubDate>Thu, 26 Oct 2006 09:29:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/programatically-activating-my-toolpalette/m-p/1800144#M80032</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-10-26T09:29:53Z</dc:date>
    </item>
    <item>
      <title>Re: Programatically Activating my ToolPalette</title>
      <link>https://forums.autodesk.com/t5/net-forum/programatically-activating-my-toolpalette/m-p/1800145#M80033</link>
      <description>Now that I am trying it, I have a few questions.&lt;BR /&gt;
1. How do I get a reference to my toolpalette in the first place??? Is this a ToolPalette or a Palette?&lt;BR /&gt;
2. What is a PaletteSet ? Is it a PaleteGroup?&lt;BR /&gt;
&lt;BR /&gt;
Thanks,&lt;BR /&gt;
CM

Message was edited by: ||||||||||</description>
      <pubDate>Thu, 09 Nov 2006 00:50:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/programatically-activating-my-toolpalette/m-p/1800145#M80033</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-11-09T00:50:21Z</dc:date>
    </item>
    <item>
      <title>Re: Programatically Activating my ToolPalette</title>
      <link>https://forums.autodesk.com/t5/net-forum/programatically-activating-my-toolpalette/m-p/1800146#M80034</link>
      <description>The window you create, that hosts the various tabs is a paletteset (like the MATERIALS palette set). After you create the paletteset, you add controls (palettes) to it (like "Woods and Plastics - Materials Sample" palette in the above paletteset). When you add a control to a palette set, you get back a reference to the new palette as the return value of the Add method.</description>
      <pubDate>Thu, 09 Nov 2006 06:19:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/programatically-activating-my-toolpalette/m-p/1800146#M80034</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-11-09T06:19:25Z</dc:date>
    </item>
    <item>
      <title>Re: Programatically Activating my ToolPalette</title>
      <link>https://forums.autodesk.com/t5/net-forum/programatically-activating-my-toolpalette/m-p/1800147#M80035</link>
      <description>I see - but I am not creating the palettes programatically.&lt;BR /&gt;
They are imported from exported palettes.&lt;BR /&gt;
So my question is how to I get a palette reference from a set of existing palettes.&lt;BR /&gt;
Basicly I have a palette called "SD Commands" which is one of 45 palettes I have imported.&lt;BR /&gt;
Is there a way to get it?&lt;BR /&gt;
I've tryed ToolPalette Manager.Find(Guid) which gives me a 'Catalog Item' which I tryed to cast to Palette. This failed.&lt;BR /&gt;
&lt;BR /&gt;
Can I walk through existing palletes?&lt;BR /&gt;
&lt;BR /&gt;
Thanks&lt;BR /&gt;
CM</description>
      <pubDate>Thu, 09 Nov 2006 12:37:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/programatically-activating-my-toolpalette/m-p/1800147#M80035</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-11-09T12:37:55Z</dc:date>
    </item>
    <item>
      <title>Re: Programatically Activating my ToolPalette</title>
      <link>https://forums.autodesk.com/t5/net-forum/programatically-activating-my-toolpalette/m-p/1800148#M80036</link>
      <description>Hi Guys,&lt;BR /&gt;
Sorry for interrupt, but think you can give the answer of my question which i have posted so many times.&lt;BR /&gt;
&lt;BR /&gt;
I have made a toolbar by using Autocad Tools-&amp;gt;Customization and add made a toolbar in partial cui file. I have also made a Menu bar in that partial Cui file. Now i want to make an option in Menubar by which i can show or hide toolbar programatically. Can you help me how to do so by programatically.</description>
      <pubDate>Tue, 14 Nov 2006 09:45:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/programatically-activating-my-toolpalette/m-p/1800148#M80036</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-11-14T09:45:34Z</dc:date>
    </item>
    <item>
      <title>Re: Programatically Activating my ToolPalette</title>
      <link>https://forums.autodesk.com/t5/net-forum/programatically-activating-my-toolpalette/m-p/1800149#M80037</link>
      <description>Hi Aslam,&lt;BR /&gt;
Try this link...&lt;BR /&gt;
http://through-the-interface.typepad.com/through_the_interface/2006/11/loading_a_parti.html &lt;BR /&gt;
Kean wrote a great artitlce about hiding &amp;amp; showing toolbars &amp;amp; menus from cui's.&lt;BR /&gt;
&lt;BR /&gt;
Cheers,&lt;BR /&gt;
CM</description>
      <pubDate>Wed, 15 Nov 2006 20:29:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/programatically-activating-my-toolpalette/m-p/1800149#M80037</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-11-15T20:29:34Z</dc:date>
    </item>
    <item>
      <title>Re: Programatically Activating my ToolPalette</title>
      <link>https://forums.autodesk.com/t5/net-forum/programatically-activating-my-toolpalette/m-p/1800150#M80038</link>
      <description>Thanks,&lt;BR /&gt;
My Problem resolved.&lt;BR /&gt;
A small Problem more. Could you help me plz.&lt;BR /&gt;
How to check if current open (active window) drawing in Autocad is Saved (user has already clicked on save and no changes made yet) Or Not Saved?</description>
      <pubDate>Fri, 17 Nov 2006 05:00:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/programatically-activating-my-toolpalette/m-p/1800150#M80038</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-11-17T05:00:49Z</dc:date>
    </item>
    <item>
      <title>Re: Programatically Activating my ToolPalette</title>
      <link>https://forums.autodesk.com/t5/net-forum/programatically-activating-my-toolpalette/m-p/1800151#M80039</link>
      <description>Hi Pavlos,&lt;BR /&gt;
First of all, thanks for the example. It was very useful for me.  But I have a little problem. The separators aren't being added to the menu I modifying (View menu). Is it happening to you, too?&lt;BR /&gt;
&lt;BR /&gt;
I am using AutoCAD and ObjectArx2006.&lt;BR /&gt;
&lt;BR /&gt;
Thanks in advance &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;
&lt;BR /&gt;
Rubén</description>
      <pubDate>Wed, 17 Jan 2007 10:54:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/programatically-activating-my-toolpalette/m-p/1800151#M80039</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-01-17T10:54:34Z</dc:date>
    </item>
    <item>
      <title>Re: Programatically Activating my ToolPalette</title>
      <link>https://forums.autodesk.com/t5/net-forum/programatically-activating-my-toolpalette/m-p/1800152#M80040</link>
      <description>I have no such problem, but I use version 2007. I can't help you with 2006 since I've not tried its ObjectARX, but - if you fail to correct it - I believe you could live without a seperator &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;</description>
      <pubDate>Wed, 17 Jan 2007 16:21:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/programatically-activating-my-toolpalette/m-p/1800152#M80040</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-01-17T16:21:42Z</dc:date>
    </item>
    <item>
      <title>Re: Programatically Activating my ToolPalette</title>
      <link>https://forums.autodesk.com/t5/net-forum/programatically-activating-my-toolpalette/m-p/1800153#M80041</link>
      <description>Did you every solve this</description>
      <pubDate>Thu, 01 Feb 2007 19:01:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/programatically-activating-my-toolpalette/m-p/1800153#M80041</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-02-01T19:01:08Z</dc:date>
    </item>
  </channel>
</rss>

