<?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: Programattically access custom theme json file from custom visual code in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Programattically-access-custom-theme-json-file-from-custom/m-p/874138#M21710</link>
    <description>Hi &lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/397"&gt;@dm-p&lt;/a&gt;&lt;BR /&gt;Fair question. I'm trying to hack together a better license validation method that enables validation at the report level. Essentially I'm trying to replicate the approach I assume zoom charts is using for license validation. They create a custom theme file for each account, then ask the user to import the custom theme file which then enables validation.&lt;BR /&gt;&lt;BR /&gt;I'm unsure exactly how they do it but I assume they store license key/hash information in custom theme file properties, then somehow access these theme properties from the custom visual to validate the user's license against their license server.&lt;BR /&gt;&lt;BR /&gt;So essentially, I'd like to store information in the theme json file that isn't theme related, and then access that information from a custom visual. It feels like a hacky way of license validation, but it at least allows keys to be entered at the report level rather than in each instance of the custom visual.&lt;BR /&gt;&lt;BR /&gt;Any help is greatly appreciated! Thanks!</description>
    <pubDate>Fri, 13 Dec 2019 03:42:19 GMT</pubDate>
    <dc:creator>robbieinoz</dc:creator>
    <dc:date>2019-12-13T03:42:19Z</dc:date>
    <item>
      <title>Programattically access custom theme json file from custom visual code</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Programattically-access-custom-theme-json-file-from-custom/m-p/874065#M21708</link>
      <description>&lt;P&gt;I'm hoping someone can help me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm developing a custom visual and in the code of the custom visual, I'd like to be able to import a custom theme's json file. I'm trying to expose the custom theme's properties to my custom visual's code. But at the moment, I have no idea how to "find" or "access" the theme json file directly from the code in my custom visual.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Anyone have any ideas how to do this? Thanks in advance!&lt;/P&gt;</description>
      <pubDate>Fri, 13 Dec 2019 02:14:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Programattically-access-custom-theme-json-file-from-custom/m-p/874065#M21708</guid>
      <dc:creator>robbieinoz</dc:creator>
      <dc:date>2019-12-13T02:14:10Z</dc:date>
    </item>
    <item>
      <title>Re: Programattically access custom theme json file from custom visual code</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Programattically-access-custom-theme-json-file-from-custom/m-p/874096#M21709</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/31049"&gt;@robbieinoz&lt;/a&gt;&amp;nbsp;- just curious... why wouldn't you configure your theme file with your custom visual properties so you (or users) can style it the conventional way?&lt;/P&gt;</description>
      <pubDate>Fri, 13 Dec 2019 02:51:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Programattically-access-custom-theme-json-file-from-custom/m-p/874096#M21709</guid>
      <dc:creator>dm-p</dc:creator>
      <dc:date>2019-12-13T02:51:49Z</dc:date>
    </item>
    <item>
      <title>Re: Programattically access custom theme json file from custom visual code</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Programattically-access-custom-theme-json-file-from-custom/m-p/874138#M21710</link>
      <description>Hi &lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/397"&gt;@dm-p&lt;/a&gt;&lt;BR /&gt;Fair question. I'm trying to hack together a better license validation method that enables validation at the report level. Essentially I'm trying to replicate the approach I assume zoom charts is using for license validation. They create a custom theme file for each account, then ask the user to import the custom theme file which then enables validation.&lt;BR /&gt;&lt;BR /&gt;I'm unsure exactly how they do it but I assume they store license key/hash information in custom theme file properties, then somehow access these theme properties from the custom visual to validate the user's license against their license server.&lt;BR /&gt;&lt;BR /&gt;So essentially, I'd like to store information in the theme json file that isn't theme related, and then access that information from a custom visual. It feels like a hacky way of license validation, but it at least allows keys to be entered at the report level rather than in each instance of the custom visual.&lt;BR /&gt;&lt;BR /&gt;Any help is greatly appreciated! Thanks!</description>
      <pubDate>Fri, 13 Dec 2019 03:42:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Programattically-access-custom-theme-json-file-from-custom/m-p/874138#M21710</guid>
      <dc:creator>robbieinoz</dc:creator>
      <dc:date>2019-12-13T03:42:19Z</dc:date>
    </item>
    <item>
      <title>Re: Programattically access custom theme json file from custom visual code</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Programattically-access-custom-theme-json-file-from-custom/m-p/874148#M21711</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/31049"&gt;@robbieinoz&lt;/a&gt; ,&lt;/P&gt;&lt;P&gt;That's a pretty cool idea, and I've often wondered how a few vendors do it...I've considered how to implement license generation/validation for visuals (I notice that Zebra BI don't validate against an external server either so they probably have a similar mechanism) but it's something that isn't easy to discover, so I'm sticking with doing mine as open source for now &lt;span class="lia-unicode-emoji" title=":face_with_tongue:"&gt;😛&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The theme file is quite an interesting idea, particularly to manage at a report level.&lt;/P&gt;&lt;P&gt;If I had to take a guess at it, they'll probably have one or more objects in the capabilities that are hidden when the visual objects are enumerated, but can still have a default value provided via theme config, and this is how it's managed. This could then be obtained from the visual settings in the usual way.&lt;/P&gt;&lt;P&gt;I'm doing a massive update to one of my visuals and have put some effort into figuring out how to add styling to the theme, which may give you some assistance. &lt;A href="https://github.com/dm-p/powerbi-visuals-smlc/blob/2.0.0/doc/theming.md" target="_self"&gt;This page is still in progress in a dev branch&lt;/A&gt;, but it might give you some ideas on how to populate a property via styling by adding your visual's ID to the file.&lt;/P&gt;&lt;P&gt;Not sure if it'll help, but I hope it does. Good luck!&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;&lt;P&gt;EDIT: corrected link to actual page in repo&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>Fri, 13 Dec 2019 04:08:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Programattically-access-custom-theme-json-file-from-custom/m-p/874148#M21711</guid>
      <dc:creator>dm-p</dc:creator>
      <dc:date>2019-12-13T04:08:04Z</dc:date>
    </item>
    <item>
      <title>Re: Programattically access custom theme json file from custom visual code</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Programattically-access-custom-theme-json-file-from-custom/m-p/874608#M21719</link>
      <description>Thanks &lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/397"&gt;@dm-p&lt;/a&gt; I think you're on the right track here. I'll have a play and see what I can figure out and report back if I get it to work. I'm very new to custom themes however so it might take me some time to stumble through!</description>
      <pubDate>Fri, 13 Dec 2019 11:52:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Programattically-access-custom-theme-json-file-from-custom/m-p/874608#M21719</guid>
      <dc:creator>robbieinoz</dc:creator>
      <dc:date>2019-12-13T11:52:49Z</dc:date>
    </item>
    <item>
      <title>Re: Programattically access custom theme json file from custom visual code</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Programattically-access-custom-theme-json-file-from-custom/m-p/875294#M21725</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/31049"&gt;@robbieinoz&lt;/a&gt; - sounds good! Feel free to get in touch if you want me to take a look or get stuck and I'll see if I can offer any further help.&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;</description>
      <pubDate>Sat, 14 Dec 2019 06:51:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Programattically-access-custom-theme-json-file-from-custom/m-p/875294#M21725</guid>
      <dc:creator>dm-p</dc:creator>
      <dc:date>2019-12-14T06:51:04Z</dc:date>
    </item>
  </channel>
</rss>

