Hello all,
I'm trying to create a text substitution that will insert a range of characters from the file name.
For example, I have a dgn named 123_plan.dgn.
My border contains the text $DGNNUMBER$
I have defined a text substitution in my pen table as follows:
Actual Replacement
$DGNNUMBER$ _FILES_
The result, of course, is that if I print 123_plan.dgn with this pen table, I get "123_plan.dgn" in my border in place of "$DGNNUMBER$".
What I'd like to do, is modify the replacement to only part of the filename. What would I need to do in order for the replacement to show "123" instead of "123_plan.dgn"?
Thank you.
I installed that version as well and do not see the system symbol set list as you do not. Is it possible for you to upgrade to 8.11.9.459?
I have Version 08.11.09.397, which, from what I gather, was installed as a prerequisite to Inroads SS3. This is my complete symbol set list:
What version of MicroStation are you using? I tested with 8.11.9.459 and I have everything I need.
Dawn, your answer looks like what I was after, but I seem to be suffering from a bug that prevents me from using the system symbol sets in my named expressions (as described here: communities.bentley.com/.../241553.aspx) So I can't test it! This is frustrating.
The following named expression will work using your example. It picks up the file name starting at character number 4 and grabs the next 6 characters.
System.String.SubString(System.Path.GetFileNameWithoutExtension (PrintDefinition.SourceFile), 4, 6)
Answer Verified By: Roger Tango