<?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 Sheet Set: Access Sheet Properties in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/sheet-set-access-sheet-properties/m-p/3758159#M51485</link>
    <description>&lt;P&gt;I am able to access(list &amp;amp; modify) custom sheet properties within a sheet set via .GetCustomPropertyBag.&amp;nbsp; How are the OOTB sheet properties accessed?&amp;nbsp; Could someone point me in the right direction?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;</description>
    <pubDate>Mon, 21 Jan 2013 17:37:19 GMT</pubDate>
    <dc:creator>ChrisPicklesimer</dc:creator>
    <dc:date>2013-01-21T17:37:19Z</dc:date>
    <item>
      <title>Sheet Set: Access Sheet Properties</title>
      <link>https://forums.autodesk.com/t5/net-forum/sheet-set-access-sheet-properties/m-p/3758159#M51485</link>
      <description>&lt;P&gt;I am able to access(list &amp;amp; modify) custom sheet properties within a sheet set via .GetCustomPropertyBag.&amp;nbsp; How are the OOTB sheet properties accessed?&amp;nbsp; Could someone point me in the right direction?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;</description>
      <pubDate>Mon, 21 Jan 2013 17:37:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/sheet-set-access-sheet-properties/m-p/3758159#M51485</guid>
      <dc:creator>ChrisPicklesimer</dc:creator>
      <dc:date>2013-01-21T17:37:19Z</dc:date>
    </item>
    <item>
      <title>Re: Sheet Set: Access Sheet Properties</title>
      <link>https://forums.autodesk.com/t5/net-forum/sheet-set-access-sheet-properties/m-p/3760955#M51486</link>
      <description>&lt;P&gt;Hi Chris,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do you mean adding the custom properties to a sheet instead of a sheetset ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If that is the case, it is very similar to the way the custom properties were added to the sheetset.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is a sample code :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;    Private Sub SetSheetCustomProp()

        Dim doc As Document
        doc = Application.DocumentManager.MdiActiveDocument

        Dim ed As Autodesk.AutoCAD.EditorInput.Editor
        ed = doc.Editor

        sheetSetMgr = New AcSmSheetSetMgr

        Dim iterDb As IAcSmEnumDatabase
        iterDb = sheetSetMgr.GetDatabaseEnumerator

        Dim ItemDb As IAcSmPersist
        ItemDb = iterDb.Next

        sheetdb = ItemDb

        LockDatabase()

        Dim sheetsetEnum As IAcSmEnumComponent
        sheetsetEnum = sheetdb.GetSheetSet().GetSheetEnumerator()

        Dim sheetsetItem As IAcSmComponent
        sheetsetItem = sheetsetEnum.Next()

        Dim iterator As IAcSmEnumPersist
        iterator = sheetdb.GetEnumerator()

        Dim item As IAcSmPersist
        item = iterator.Next()

        While item IsNot Nothing
            Dim type As String
            type = item.GetTypeName()

            Select Case type
                Case "AcSmSheet"
                    'List the sheet
                    Dim sheet As IAcSmSheet = TryCast(item, IAcSmSheet)

                    Dim i As Integer
                    i = 0

                    Do While i &amp;lt; 5
                        Dim cBag As IAcSmCustomPropertyBag
                        Dim cBagVal As New AcSmCustomPropertyValue

                        cBag = sheet.GetCustomPropertyBag

                        cBagVal.InitNew(cBag)

                        cBagVal.SetFlags(PropertyFlags.CUSTOM_SHEET_PROP)
                        cBagVal.SetValue("Test" + i.ToString())

                        cBag.SetProperty("Test" + i.ToString(), cBagVal)

                        cBagVal = Nothing

                        i = i + 1
                    Loop

                Case Else
                    ed.WriteMessage("vbCrLfType :" + type)

            End Select
            item = iterator.Next()
        End While


        UnlockDatabase()
    End Sub
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Jan 2013 18:38:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/sheet-set-access-sheet-properties/m-p/3760955#M51486</guid>
      <dc:creator>Balaji_Ram</dc:creator>
      <dc:date>2013-01-24T18:38:43Z</dc:date>
    </item>
    <item>
      <title>Re: Sheet Set: Access Sheet Properties</title>
      <link>https://forums.autodesk.com/t5/net-forum/sheet-set-access-sheet-properties/m-p/3761961#M51487</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the response and code.&amp;nbsp; I was hoping to access the non-custom properties of a sheet like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sheet title, Sheet number, Revision number, Revision date, Purpose, Category, Description &amp;amp; Include for publish&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I know I can do this through SSM but can I access progrmatically?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;</description>
      <pubDate>Fri, 25 Jan 2013 19:11:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/sheet-set-access-sheet-properties/m-p/3761961#M51487</guid>
      <dc:creator>ChrisPicklesimer</dc:creator>
      <dc:date>2013-01-25T19:11:01Z</dc:date>
    </item>
    <item>
      <title>Re: Sheet Set: Access Sheet Properties</title>
      <link>https://forums.autodesk.com/t5/net-forum/sheet-set-access-sheet-properties/m-p/3762849#M51488</link>
      <description>&lt;P&gt;Hi Chris,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is a blog post on accessing these properties :&lt;/P&gt;
&lt;P&gt;&lt;A href="http://adndevblog.typepad.com/autocad/2013/01/accessing-revision-number-revision-date-purpose-and-category-of-a-sheet.html" target="_blank"&gt;http://adndevblog.typepad.com/autocad/2013/01/accessing-revision-number-revision-date-purpose-and-category-of-a-sheet.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Jan 2013 04:25:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/sheet-set-access-sheet-properties/m-p/3762849#M51488</guid>
      <dc:creator>Balaji_Ram</dc:creator>
      <dc:date>2013-01-28T04:25:18Z</dc:date>
    </item>
    <item>
      <title>Re: Sheet Set: Access Sheet Properties</title>
      <link>https://forums.autodesk.com/t5/net-forum/sheet-set-access-sheet-properties/m-p/3763159#M51489</link>
      <description>&lt;P&gt;Thanks!&amp;nbsp; I now see how I can loop through sheets and get the current values.&amp;nbsp; I would now like to modify these values, &amp;nbsp;I noticed the following methods: .SetRevisionNumber,&amp;nbsp; .SetRevisionDate, .SetIssuePurpose and .SetCategory.&amp;nbsp; I tried to update using these methods ( example: mySheet2.SetRevisionNumber("2")&amp;nbsp; )&amp;nbsp;&amp;nbsp;but got an error.&amp;nbsp;How are these values modified?&amp;nbsp; Thanks again.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;</description>
      <pubDate>Mon, 28 Jan 2013 14:20:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/sheet-set-access-sheet-properties/m-p/3763159#M51489</guid>
      <dc:creator>ChrisPicklesimer</dc:creator>
      <dc:date>2013-01-28T14:20:30Z</dc:date>
    </item>
    <item>
      <title>Re: Sheet Set: Access Sheet Properties</title>
      <link>https://forums.autodesk.com/t5/net-forum/sheet-set-access-sheet-properties/m-p/3765893#M51490</link>
      <description>&lt;P&gt;Hi Chris,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What is the error message that you get ? Maybe you havent locked the sheetset database before setting the revision number ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is a sample code to set the revision number for all the sheets in a sheetset :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;    &amp;lt;CommandMethod("SetRevision")&amp;gt; _
    Public Sub SetRevisionMethod()
        Dim dstFile As String
        dstFile = "C:\Temp\MySheetSet\MySheetSet.dst"

        Dim mgr As AcSmSheetSetMgr = New AcSmSheetSetMgr()
        Dim db As AcSmDatabase = New AcSmDatabase()
        db = mgr.OpenDatabase(dstFile, False)

        Dim lockStatus As AcSmLockStatus
        lockStatus = db.GetLockStatus

        If lockStatus = 0 Then
            db.LockDb(db)
        End If

        Dim ss As AcSmSheetSet = db.GetSheetSet()

        Dim EnumSheets As IAcSmEnumComponent = ss.GetSheetEnumerator()

        Dim smComponent As IAcSmComponent
        Dim sheet As IAcSmSheet
        Dim sheet2 As IAcSmSheet2

        smComponent = EnumSheets.Next()

        While True
            If smComponent Is Nothing Then
                Exit While
            End If

            sheet = TryCast(smComponent, IAcSmSheet)

            ' To access the revision number, 
            ' Revision date, Purpose and Category,
            ' cast it as IAcSmSheet2
            sheet2 = TryCast(smComponent, IAcSmSheet2)
            If sheet2 IsNot Nothing Then
                sheet2.SetRevisionNumber("111")
            End If

            smComponent = EnumSheets.Next()
        End While

        db.UnlockDb(db)

        mgr.Close(db)
    End Sub&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 31 Jan 2013 12:56:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/sheet-set-access-sheet-properties/m-p/3765893#M51490</guid>
      <dc:creator>Balaji_Ram</dc:creator>
      <dc:date>2013-01-31T12:56:23Z</dc:date>
    </item>
    <item>
      <title>Re: Sheet Set: Access Sheet Properties</title>
      <link>https://forums.autodesk.com/t5/net-forum/sheet-set-access-sheet-properties/m-p/3766858#M51491</link>
      <description>&lt;P&gt;Thanks, I'll give that a try.&lt;/P&gt;</description>
      <pubDate>Fri, 01 Feb 2013 15:32:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/sheet-set-access-sheet-properties/m-p/3766858#M51491</guid>
      <dc:creator>ChrisPicklesimer</dc:creator>
      <dc:date>2013-02-01T15:32:56Z</dc:date>
    </item>
  </channel>
</rss>

