I was following your example located here (Display military symbols with a dictionary renderer) in order to display Military Symbols based on the DictionaryRenderer. I get an error when attempting to Open the Symbol Style as follows:
SymbolStyle ss = await SymbolStyle.OpenAsync(@D:\Source\MapEngine\ESRI\mil2525d.stylx); DictionarySymbolStyle dss = ss as DictionarySymbolStyle;
The first line executes properly, but the second line fails ( assigns a null value) when assigning the SymbolStyle to the DictionaryStyle. I downloaded the styles from here: (http://solutions.arcgis.com/defense/help/military-symbology-styles/)
Am I missing something here? I am on 100.1 of the .NET SDK.
Robert,
Calling as below, I am able to see all the information related to that "mil2525d" symbol properties. I am using your stylx for testing.
var dss = await DictionarySymbolStyle.OpenAsync("mil2525d", @<folder_path>\mil2525d.stylx); Console.WriteLine(dss.TextFieldNames[0].ToString());
result: "additionalinformation"
DictionarySymbolStyle.OpenAsync Method
Hope that helps.
Nagma
I have the same issue after downgrading, which I expected after your last message. I will create a small standalone app and see if I can get it to work. I will let you know what I find.
Interesting. I am at a loss. Trying to think of what I may have incorrect that would cause a simple assignment to result in a null. I would understand of the first one failed
Hi Robert,
I downloaded you file from the link and I used 100.1 .Net API and I don't see any issue. Even the size of the two files are different, both of those works without any issue at my side.
Your file was different, but I got the same result. I am on 100.1 of the API. I may try downgrading to 100.0 to see if I get the same results.
I have Runtime Qt 100 installed, the file "mil2525d.stylx" comes with the installation. So I grabbed the file and used your code in .Net application. it works for me. Not sure whether .stylx file is corrupted. Attached is the file for your reference.
Les membres connectés peuvent publier, suivre les mises à jour, et plus encore. Nouveau ici ? Inscrivez-vous gratuitement.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.