<?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 Create a View with CategoryName in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/create-a-view-with-categoryname/m-p/5815528#M38653</link>
    <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Im currenty working on a method of inserting multiple drawings (from 3rd party) into 1 model drawing and creating views for use with the SSM. It is all working well except I am having issues with assigning a CategoryName. The information is as a String, and is part of the ViewTableRecord. When I try to assign it a value "Longsection" for example I get an error message "eNoDatabase" error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;my Code snippet:&lt;/P&gt;&lt;P&gt;[code]&lt;/P&gt;&lt;P&gt;For Each myVP In myViewPorts&lt;BR /&gt;'' Check to see if the named view 'View1' exists&lt;BR /&gt;If (acViewTbl.Has(myVP.Name) = False) Then&lt;BR /&gt;'' Open the View Table for write&lt;BR /&gt;acViewTbl.UpgradeOpen()&lt;/P&gt;&lt;P&gt;'' Create a new View table record and name the view "View1"&lt;BR /&gt;Dim acViewTblRec As ViewTableRecord = New ViewTableRecord()&lt;BR /&gt;acViewTblRec.Name = myVP.Name&lt;BR /&gt;acViewTblRec.CenterPoint = New Point2d((myVP.Min.X + myVP.Max.X) / 2, (myVP.Min.Y + myVP.Max.Y) / 2)&lt;BR /&gt;acViewTblRec.Width = myVP.Max.X - myVP.Min.X&lt;BR /&gt;acViewTblRec.Height = myVP.Max.Y - myVP.Min.Y&lt;BR /&gt;acViewTblRec.ViewTwist = myVP.Rotation&lt;BR /&gt;acViewTblRec.CategoryName = myVP.Catagory&lt;BR /&gt;acViewTblRec.AnnotationScale = myVPScale&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;'' Add the new View table record to the View table and the transaction&lt;BR /&gt;acViewTbl.Add(acViewTblRec)&lt;BR /&gt;acTrans.AddNewlyCreatedDBObject(acViewTblRec, True)&lt;/P&gt;&lt;P&gt;acDoc.Editor.WriteMessage(vbLf &amp;amp; "Created View: " &amp;amp; myVP.Name)&lt;BR /&gt;End If&lt;BR /&gt;Next&lt;/P&gt;&lt;P&gt;[/code]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help would be greatly appeciated.&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;Adam.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 14 Sep 2015 12:19:28 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2015-09-14T12:19:28Z</dc:date>
    <item>
      <title>Create a View with CategoryName</title>
      <link>https://forums.autodesk.com/t5/net-forum/create-a-view-with-categoryname/m-p/5815528#M38653</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Im currenty working on a method of inserting multiple drawings (from 3rd party) into 1 model drawing and creating views for use with the SSM. It is all working well except I am having issues with assigning a CategoryName. The information is as a String, and is part of the ViewTableRecord. When I try to assign it a value "Longsection" for example I get an error message "eNoDatabase" error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;my Code snippet:&lt;/P&gt;&lt;P&gt;[code]&lt;/P&gt;&lt;P&gt;For Each myVP In myViewPorts&lt;BR /&gt;'' Check to see if the named view 'View1' exists&lt;BR /&gt;If (acViewTbl.Has(myVP.Name) = False) Then&lt;BR /&gt;'' Open the View Table for write&lt;BR /&gt;acViewTbl.UpgradeOpen()&lt;/P&gt;&lt;P&gt;'' Create a new View table record and name the view "View1"&lt;BR /&gt;Dim acViewTblRec As ViewTableRecord = New ViewTableRecord()&lt;BR /&gt;acViewTblRec.Name = myVP.Name&lt;BR /&gt;acViewTblRec.CenterPoint = New Point2d((myVP.Min.X + myVP.Max.X) / 2, (myVP.Min.Y + myVP.Max.Y) / 2)&lt;BR /&gt;acViewTblRec.Width = myVP.Max.X - myVP.Min.X&lt;BR /&gt;acViewTblRec.Height = myVP.Max.Y - myVP.Min.Y&lt;BR /&gt;acViewTblRec.ViewTwist = myVP.Rotation&lt;BR /&gt;acViewTblRec.CategoryName = myVP.Catagory&lt;BR /&gt;acViewTblRec.AnnotationScale = myVPScale&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;'' Add the new View table record to the View table and the transaction&lt;BR /&gt;acViewTbl.Add(acViewTblRec)&lt;BR /&gt;acTrans.AddNewlyCreatedDBObject(acViewTblRec, True)&lt;/P&gt;&lt;P&gt;acDoc.Editor.WriteMessage(vbLf &amp;amp; "Created View: " &amp;amp; myVP.Name)&lt;BR /&gt;End If&lt;BR /&gt;Next&lt;/P&gt;&lt;P&gt;[/code]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help would be greatly appeciated.&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;Adam.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Sep 2015 12:19:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/create-a-view-with-categoryname/m-p/5815528#M38653</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-09-14T12:19:28Z</dc:date>
    </item>
  </channel>
</rss>

