<?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: System Variables in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/system-variables/m-p/2932210#M61742</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the diffrent between tilemode and cvport is, that the cvport is an object and tilemode only an integer value.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;use this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Document doc = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument;&lt;/P&gt;&lt;P&gt;Database db = doc.Database;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;CurrentViewportTableRecordId cvId = db.CurrentViewportTableRecordId;&lt;/P&gt;&lt;P&gt;Transaction tr = db.TransactionManager.StartTransaction();&lt;/P&gt;&lt;P&gt;using (tr)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp; //The following code gets the current viewport as an object.&lt;/P&gt;&lt;P&gt;&amp;nbsp; ViewportTableRecord cv = (ViewportTableRecord)tr.GetObject(cvId, OpenMode.ForRead);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think thats works, but it is not tested.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Jürgen&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 28 Feb 2011 13:38:21 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2011-02-28T13:38:21Z</dc:date>
    <item>
      <title>System Variables</title>
      <link>https://forums.autodesk.com/t5/net-forum/system-variables/m-p/2932184#M61741</link>
      <description>&lt;P&gt;I am sudying the sample code in the 'AutoCAD .NET Developer's Guide'.&lt;BR /&gt;&lt;BR /&gt;'CVPORT' is a system variable. It is called as follows:&lt;BR /&gt;&lt;BR /&gt;Application.GetSystemVariable("CVPORT")&lt;BR /&gt;&lt;BR /&gt;'TileMode' is another system variable which is called as follows:&lt;BR /&gt;&lt;BR /&gt;Application.DocumentManager.MdiActiveDocument.Database.TileMode&lt;BR /&gt;&lt;BR /&gt;Can somebody explain me the difference between the two methods of accessing the system variable?&lt;BR /&gt;&lt;BR /&gt;Also, the logic about which method can be used with which system variable because I found that&lt;BR /&gt;&lt;BR /&gt;Application.DocumentManager.MdiActiveDocument.Database.Cvport&lt;BR /&gt;&lt;BR /&gt;does not seem to work.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Feb 2011 13:23:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/system-variables/m-p/2932184#M61741</guid>
      <dc:creator>sanganaksakha</dc:creator>
      <dc:date>2011-02-28T13:23:43Z</dc:date>
    </item>
    <item>
      <title>Re: System Variables</title>
      <link>https://forums.autodesk.com/t5/net-forum/system-variables/m-p/2932210#M61742</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the diffrent between tilemode and cvport is, that the cvport is an object and tilemode only an integer value.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;use this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Document doc = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument;&lt;/P&gt;&lt;P&gt;Database db = doc.Database;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;CurrentViewportTableRecordId cvId = db.CurrentViewportTableRecordId;&lt;/P&gt;&lt;P&gt;Transaction tr = db.TransactionManager.StartTransaction();&lt;/P&gt;&lt;P&gt;using (tr)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp; //The following code gets the current viewport as an object.&lt;/P&gt;&lt;P&gt;&amp;nbsp; ViewportTableRecord cv = (ViewportTableRecord)tr.GetObject(cvId, OpenMode.ForRead);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think thats works, but it is not tested.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Jürgen&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Feb 2011 13:38:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/system-variables/m-p/2932210#M61742</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-02-28T13:38:21Z</dc:date>
    </item>
  </channel>
</rss>

