<?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: AcMapLayerGroup Documentation? in AutoCAD Map 3D Developer Forum</title>
    <link>https://forums.autodesk.com/t5/autocad-map-3d-developer-forum/acmaplayergroup-documentation/m-p/2737929#M2427</link>
    <description>&lt;P&gt;AcMapLayerGroup &lt;STRONG&gt;derives&lt;/STRONG&gt; from MgLayerGroup so that methods and properties of MgLayerGroup also apply to AcMapLayerGroup&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;MgLayerGroup does not require a resource id as it is not a resource. It is a container by which MgLayerBase objects (and its derivatives MgLayer and AcMapLayer) can belong in by calling its SetGroup() method (or assigning to its Group property)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So what you would do is:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Get a reference to the current map&lt;/LI&gt;&lt;LI&gt;Add your layer groups to the map&lt;/LI&gt;&lt;LI&gt;For each layer you create you can optionally assign to one of the layer groups by calling its SetGroup() method (or assigning to its Group property)&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- Jackie&lt;/P&gt;</description>
    <pubDate>Fri, 06 Aug 2010 00:13:30 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2010-08-06T00:13:30Z</dc:date>
    <item>
      <title>AcMapLayerGroup Documentation?</title>
      <link>https://forums.autodesk.com/t5/autocad-map-3d-developer-forum/acmaplayergroup-documentation/m-p/2736769#M2426</link>
      <description>&lt;P&gt;Can any help me find some documentation on the Acmaplayergroup class(s)?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've looked through the SDK and i can't found anything other then one reference to it saying that you can add mulitple layers and they most be unique but nothing about how to create them.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;does it need a resouce id? does it need a library path? do you need to create a mglayergroup object then add it as an acmaplayergroup (as you do with a layer)?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;either that or sample c# code of adding a layergroup &lt;img id="smileywink" class="emoticon emoticon-smileywink" src="https://forums.autodesk.com/i/smilies/16x16_smiley-wink.png" alt="Smiley Wink" title="Smiley Wink" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;any help would be great.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;</description>
      <pubDate>Thu, 05 Aug 2010 06:11:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-map-3d-developer-forum/acmaplayergroup-documentation/m-p/2736769#M2426</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-08-05T06:11:43Z</dc:date>
    </item>
    <item>
      <title>Re: AcMapLayerGroup Documentation?</title>
      <link>https://forums.autodesk.com/t5/autocad-map-3d-developer-forum/acmaplayergroup-documentation/m-p/2737929#M2427</link>
      <description>&lt;P&gt;AcMapLayerGroup &lt;STRONG&gt;derives&lt;/STRONG&gt; from MgLayerGroup so that methods and properties of MgLayerGroup also apply to AcMapLayerGroup&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;MgLayerGroup does not require a resource id as it is not a resource. It is a container by which MgLayerBase objects (and its derivatives MgLayer and AcMapLayer) can belong in by calling its SetGroup() method (or assigning to its Group property)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So what you would do is:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Get a reference to the current map&lt;/LI&gt;&lt;LI&gt;Add your layer groups to the map&lt;/LI&gt;&lt;LI&gt;For each layer you create you can optionally assign to one of the layer groups by calling its SetGroup() method (or assigning to its Group property)&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- Jackie&lt;/P&gt;</description>
      <pubDate>Fri, 06 Aug 2010 00:13:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-map-3d-developer-forum/acmaplayergroup-documentation/m-p/2737929#M2427</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-08-06T00:13:30Z</dc:date>
    </item>
    <item>
      <title>Re: AcMapLayerGroup Documentation?</title>
      <link>https://forums.autodesk.com/t5/autocad-map-3d-developer-forum/acmaplayergroup-documentation/m-p/2737967#M2428</link>
      <description>&lt;P&gt;Jackie,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the response. That's what i suspected but if that is the case then i most of missed something. below is the c# code i am running where;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;layergroup = a text string of layergroup name i want to use.&lt;/P&gt;&lt;P&gt;cmap = current map (surprise surprise).&lt;/P&gt;&lt;P&gt;layer is the mglayerbase object i am adding (its already had its resource id, definition, etc set)&lt;/P&gt;&lt;P&gt;ed is the autocad editor&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;if (layergroup != null )&lt;BR /&gt;&amp;nbsp;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;MgLayerGroupCollection layergroups = cmap.GetLayerGroups();&lt;BR /&gt;&amp;nbsp;&amp;nbsp;foreach (MgLayerGroup group in layergroups)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (group.Name == layergroup)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ed.WriteMessage("\nThe Layergroup called (" + layergroup + ")has been found");&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;layer.SetGroup(group);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR /&gt;&amp;nbsp;&amp;nbsp;}&lt;/P&gt;&lt;P&gt;}&lt;BR /&gt;&amp;nbsp;AcMapMap.GetCurrentMap().GetLayers().Add(layer);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am getting the&amp;nbsp;"The Layergroup&amp;nbsp;... found" line&amp;nbsp;on the commandline but the layer is not being added to the group. Am i missing something that you can see?&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Aug 2010 01:50:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-map-3d-developer-forum/acmaplayergroup-documentation/m-p/2737967#M2428</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-08-06T01:50:35Z</dc:date>
    </item>
    <item>
      <title>Re: AcMapLayerGroup Documentation?</title>
      <link>https://forums.autodesk.com/t5/autocad-map-3d-developer-forum/acmaplayergroup-documentation/m-p/2739393#M2429</link>
      <description>&lt;P&gt;&amp;nbsp;Ok I have found away of doing it (so this is an FYI for anyone else trying to do the same)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Basically you have to first add the layer to the map and then assign the group to the added layer.&lt;/P&gt;&lt;PRE&gt;MgLayerBase setgrouplayer =  AcMapMap.GetCurrentMap().GetLayers().GetItem(layername);
MgLayerGroupCollection groups = cmap.GetLayerGroups();
foreach (MgLayerGroup group in groups)
{
    if (group.Name == layergroup)
    {
        setgrouplayer.SetGroup(group);
    }
}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;where;&lt;/P&gt;&lt;P&gt;layername = the name of the layer you wish to move to the group (string)&lt;BR /&gt;layergroup = the name of the group you wish to add the layer to (string &amp;amp; must be exisitng in the current map)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is it possible for this to be outlined in the SDK docs for the next release please (unless I have the concept incorrect)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Aug 2010 05:05:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-map-3d-developer-forum/acmaplayergroup-documentation/m-p/2739393#M2429</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-08-09T05:05:54Z</dc:date>
    </item>
  </channel>
</rss>

