<?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: Rename Layout Name - SheetSet Manager API in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/rename-layout-name-sheetset-manager-api/m-p/11391799#M11864</link>
    <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/8699423"&gt;@edfdiloreto&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Well, yes and no. I don't know what the context is of what you are trying do. However, you are using the Sheetset Manager API. This is working with .dst files of the Sheetset which references the layouts of drawings. It seems strange to me to want to change the layout name from the context of working with sheet sets and not the other way around. Changing the name of the layout would be done from the context of working with the actual source drawing database. There are many examples on here for changing the name of the layout.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 31 Aug 2022 00:56:36 GMT</pubDate>
    <dc:creator>hippe013</dc:creator>
    <dc:date>2022-08-31T00:56:36Z</dc:date>
    <item>
      <title>Rename Layout Name - SheetSet Manager API</title>
      <link>https://forums.autodesk.com/t5/net-forum/rename-layout-name-sheetset-manager-api/m-p/11388821#M11859</link>
      <description>&lt;P&gt;I'm trying to rename the sheet layout name using the API. I wanto to rename the layout name (see image)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Layout Name.png" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1109461iC9008C04625344BF/image-size/large?v=v2&amp;amp;px=999" role="button" title="Layout Name.png" alt="Layout Name.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have the following code, but it's not working.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;// Locking DB here
string layoutName = "My new Layout Name";
AcSmSheet sheet = (AcSmSheet)_sheetId.GetPersistObject(); 
sheet.GetLayout().SetName(layoutName);
// Unlocking DB here&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm using the correct method to set the new name? The code runs without any errors but the name is not changed.&lt;/P&gt;</description>
      <pubDate>Mon, 29 Aug 2022 20:59:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/rename-layout-name-sheetset-manager-api/m-p/11388821#M11859</guid>
      <dc:creator>edfdiloreto</dc:creator>
      <dc:date>2022-08-29T20:59:23Z</dc:date>
    </item>
    <item>
      <title>Re: Rename Layout Name - SheetSet Manager API</title>
      <link>https://forums.autodesk.com/t5/net-forum/rename-layout-name-sheetset-manager-api/m-p/11391314#M11860</link>
      <description>&lt;P&gt;I don't have the full picture of your code so I shooting in the dark here, but would the following have anything to do with your issue?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;"&lt;SPAN&gt;In order to make changes to a database, it must be locked using the LockDb&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;method. Any changes you make can be saved or rolled back using the&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;A href="https://documentation.help/AutoCAD-SSO-API/UnlockDb_AcSmDatabase.htm" target="_blank" rel="noopener"&gt;UnlockDb&lt;/A&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;method. UnlockDb&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;has a Boolean&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;commit&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;parameter that controls this behavior. If the value of the&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;commit&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;parameter is true, then the changes will be written to the file. If you pass in false for the&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;commit&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;parameter, the changes will be rolled back or undone by reloading the database from disk."&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Aug 2022 19:37:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/rename-layout-name-sheetset-manager-api/m-p/11391314#M11860</guid>
      <dc:creator>hippe013</dc:creator>
      <dc:date>2022-08-30T19:37:08Z</dc:date>
    </item>
    <item>
      <title>Re: Rename Layout Name - SheetSet Manager API</title>
      <link>https://forums.autodesk.com/t5/net-forum/rename-layout-name-sheetset-manager-api/m-p/11391328#M11861</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1633394"&gt;@hippe013&lt;/a&gt;&amp;nbsp;&amp;nbsp;Thanks for your response. I'm using the unlock method with the parameter set to true.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Aug 2022 20:08:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/rename-layout-name-sheetset-manager-api/m-p/11391328#M11861</guid>
      <dc:creator>edfdiloreto</dc:creator>
      <dc:date>2022-08-30T20:08:43Z</dc:date>
    </item>
    <item>
      <title>Re: Rename Layout Name - SheetSet Manager API</title>
      <link>https://forums.autodesk.com/t5/net-forum/rename-layout-name-sheetset-manager-api/m-p/11391442#M11862</link>
      <description>&lt;P&gt;In looking more into it.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;AcSmAcDbLayoutReference.SetName Method&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Sets the name of the referenced object.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;"Input string containing the name of a symbol table record or dictionary entry"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I don't believe that this method is for renaming the layout.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Aug 2022 20:26:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/rename-layout-name-sheetset-manager-api/m-p/11391442#M11862</guid>
      <dc:creator>hippe013</dc:creator>
      <dc:date>2022-08-30T20:26:18Z</dc:date>
    </item>
    <item>
      <title>Re: Rename Layout Name - SheetSet Manager API</title>
      <link>https://forums.autodesk.com/t5/net-forum/rename-layout-name-sheetset-manager-api/m-p/11391570#M11863</link>
      <description>&lt;P&gt;If that is the case, it's very confusing!&lt;/P&gt;</description>
      <pubDate>Tue, 30 Aug 2022 21:36:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/rename-layout-name-sheetset-manager-api/m-p/11391570#M11863</guid>
      <dc:creator>edfdiloreto</dc:creator>
      <dc:date>2022-08-30T21:36:59Z</dc:date>
    </item>
    <item>
      <title>Re: Rename Layout Name - SheetSet Manager API</title>
      <link>https://forums.autodesk.com/t5/net-forum/rename-layout-name-sheetset-manager-api/m-p/11391799#M11864</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/8699423"&gt;@edfdiloreto&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Well, yes and no. I don't know what the context is of what you are trying do. However, you are using the Sheetset Manager API. This is working with .dst files of the Sheetset which references the layouts of drawings. It seems strange to me to want to change the layout name from the context of working with sheet sets and not the other way around. Changing the name of the layout would be done from the context of working with the actual source drawing database. There are many examples on here for changing the name of the layout.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 31 Aug 2022 00:56:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/rename-layout-name-sheetset-manager-api/m-p/11391799#M11864</guid>
      <dc:creator>hippe013</dc:creator>
      <dc:date>2022-08-31T00:56:36Z</dc:date>
    </item>
    <item>
      <title>Re: Rename Layout Name - SheetSet Manager API</title>
      <link>https://forums.autodesk.com/t5/net-forum/rename-layout-name-sheetset-manager-api/m-p/11391816#M11865</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/8699423"&gt;@edfdiloreto&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A quick example of renaming a layout&lt;/P&gt;&lt;P&gt;Sorry for VB, it's what I use.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Dim db As Database = Application.DocumentManager.MdiActiveDocument.Database
Dim ed As Editor = Application.DocumentManager.MdiActiveDocument.Editor

Dim key As String = "Layout1"

Using tr As Transaction = db.TransactionManager.StartTransaction
    Dim dLayouts As DBDictionary = tr.GetObject(db.LayoutDictionaryId, OpenMode.ForRead)

    If dLayouts.Contains(key) Then
        Dim layout As Layout = tr.GetObject(dLayouts(key), OpenMode.ForWrite)
        layout.LayoutName = "My Renamed Layout1"
        ed.Regen()
    End If

    tr.Commit()
End Using&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 31 Aug 2022 01:09:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/rename-layout-name-sheetset-manager-api/m-p/11391816#M11865</guid>
      <dc:creator>hippe013</dc:creator>
      <dc:date>2022-08-31T01:09:21Z</dc:date>
    </item>
    <item>
      <title>Re: Rename Layout Name - SheetSet Manager API</title>
      <link>https://forums.autodesk.com/t5/net-forum/rename-layout-name-sheetset-manager-api/m-p/11392671#M11866</link>
      <description>&lt;P&gt;Great, I'll use the standard Autocad .NET API then. I thought it was more straightforward to do it from the SSM API.&lt;/P&gt;</description>
      <pubDate>Wed, 31 Aug 2022 11:38:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/rename-layout-name-sheetset-manager-api/m-p/11392671#M11866</guid>
      <dc:creator>edfdiloreto</dc:creator>
      <dc:date>2022-08-31T11:38:12Z</dc:date>
    </item>
    <item>
      <title>Re: Rename Layout Name - SheetSet Manager API</title>
      <link>https://forums.autodesk.com/t5/net-forum/rename-layout-name-sheetset-manager-api/m-p/11396344#M11867</link>
      <description>&lt;P&gt;I am happy I was able to help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Sep 2022 21:27:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/rename-layout-name-sheetset-manager-api/m-p/11396344#M11867</guid>
      <dc:creator>hippe013</dc:creator>
      <dc:date>2022-09-01T21:27:42Z</dc:date>
    </item>
  </channel>
</rss>

