<?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: VP transparency in VBA Forum</title>
    <link>https://forums.autodesk.com/t5/vba-forum/vp-transparency/m-p/9976635#M3826</link>
    <description>&lt;P&gt;As&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/6508502"&gt;@stefanveurink68AXD&lt;/a&gt;&amp;nbsp;pointed out, with AutoCAD .NET API, you can write code to do it via LayerViewportProperties class.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;While there is no direct API support with AutoCAD COM API/VBA, if you really have to do it in VBA, you have to dig into undocumented ExtensionDictionary of AcadLayer object. Something like:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. Test if an AcadLayer has ExtensionDictionary or not;&lt;/P&gt;
&lt;P&gt;2. If it has, test if the dictionary has key "ADSK_XREC_LAYER_ALPHA_OVR" (the other 2 keys for layer's viewport overrides are "ADSK_XREC_LAYER_LINETYPE_OVR" and "ADSK_XREC_LAYER_LINEWT_OVR");&lt;/P&gt;
&lt;P&gt;3. If the key exists, get the value of the dictionary item (Xrecord) form that key;&lt;/P&gt;
&lt;P&gt;4. Parse the Xrecord to find the Alpha value (0-255) of the transparency applied to specific viewport;&lt;/P&gt;
&lt;P&gt;5. Change the Alpha value in the Xrecord as needed&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Again, since it is not exposed via API/not documented, it is up to you to investigate how the data are stored in ExtensionDictionary and parse/change it correctly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 04 Jan 2021 15:16:14 GMT</pubDate>
    <dc:creator>norman.yuan</dc:creator>
    <dc:date>2021-01-04T15:16:14Z</dc:date>
    <item>
      <title>VP transparency</title>
      <link>https://forums.autodesk.com/t5/vba-forum/vp-transparency/m-p/9967411#M3824</link>
      <description>&lt;P&gt;Is it possible to change the VP transparency of a layer?&amp;nbsp; LISP, vba or whatever code?&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-inline" image-alt="jeremye86_0-1609247841434.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/860811iDB496876FED4FD81/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jeremye86_0-1609247841434.png" alt="jeremye86_0-1609247841434.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;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Dec 2020 13:18:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/vp-transparency/m-p/9967411#M3824</guid>
      <dc:creator>jeremye86</dc:creator>
      <dc:date>2020-12-29T13:18:04Z</dc:date>
    </item>
    <item>
      <title>Re: VP transparency</title>
      <link>https://forums.autodesk.com/t5/vba-forum/vp-transparency/m-p/9976222#M3825</link>
      <description>&lt;P&gt;Don't think this is possible in vba, but in .net api it must be possible.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;reason i say this is with .net api is also possible to change vplineweight, vpcolor, so surely vptransparency must be there too.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;only possible way i see in vba is by maybe using a dictionary. but dont know anything about this.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Jan 2021 11:44:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/vp-transparency/m-p/9976222#M3825</guid>
      <dc:creator>stefanveurink68AXD</dc:creator>
      <dc:date>2021-01-04T11:44:08Z</dc:date>
    </item>
    <item>
      <title>Re: VP transparency</title>
      <link>https://forums.autodesk.com/t5/vba-forum/vp-transparency/m-p/9976635#M3826</link>
      <description>&lt;P&gt;As&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/6508502"&gt;@stefanveurink68AXD&lt;/a&gt;&amp;nbsp;pointed out, with AutoCAD .NET API, you can write code to do it via LayerViewportProperties class.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;While there is no direct API support with AutoCAD COM API/VBA, if you really have to do it in VBA, you have to dig into undocumented ExtensionDictionary of AcadLayer object. Something like:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. Test if an AcadLayer has ExtensionDictionary or not;&lt;/P&gt;
&lt;P&gt;2. If it has, test if the dictionary has key "ADSK_XREC_LAYER_ALPHA_OVR" (the other 2 keys for layer's viewport overrides are "ADSK_XREC_LAYER_LINETYPE_OVR" and "ADSK_XREC_LAYER_LINEWT_OVR");&lt;/P&gt;
&lt;P&gt;3. If the key exists, get the value of the dictionary item (Xrecord) form that key;&lt;/P&gt;
&lt;P&gt;4. Parse the Xrecord to find the Alpha value (0-255) of the transparency applied to specific viewport;&lt;/P&gt;
&lt;P&gt;5. Change the Alpha value in the Xrecord as needed&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Again, since it is not exposed via API/not documented, it is up to you to investigate how the data are stored in ExtensionDictionary and parse/change it correctly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Jan 2021 15:16:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/vp-transparency/m-p/9976635#M3826</guid>
      <dc:creator>norman.yuan</dc:creator>
      <dc:date>2021-01-04T15:16:14Z</dc:date>
    </item>
  </channel>
</rss>

