Using AECOSIM CONNECT UPDATE 1 | Windows 8.1
Trying to customize some ribbon buttons using Named expressions. What I want to do is recognize a portion of a file name and if it matches show a button and if not don't show a specific button.
I have spent a significant amount of time and tried many different possibilities (substring, length -, getfilenamewithoutextension and others) and all have given me grief.
I feel the approaches below have been the most promising, because the individual pieces seem to work. However when I combine and click the Test button to evaluate, I get a "can not evaluate expression" error instead of a true or false.
System.String.IndexOf(ConfigVar.GetExpandedConfigVar("_DGNFILE"), ”_GUI.DGNLIB”) > 0
System.String.IndexOf(System.String.ToString(ConfigVar.GetExpandedConfigVar("_DGNFILE"), ”_GUI.DGNLIB”)) > 0
What am I doing wrong?
Thanks in advance
Keith
Hi Keith,
what exactly do you want to compare? If the file name ends with _GUI.dgnlib?
Regards,
Jan
Bentley Accredited Developer: iTwin Platform - AssociateLabyrinth Technology | dev.notes() | cad.point
I was looking to evaluate the integer return from the system.string.indexof. The fact that the file name end in "_GUI.DGNLIB" should have returned an integer greater than zero because it is true. Instead I got a can not evaluate syntax error. Thanks for chiming in.