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.
Would this number happened to be stored in any other place such as a variable or tag?
You could write a VBA macro to read the active filename and after extracting the number, store it in a CFG variable. Then a pen table can substitute the variable for some string in a file. The code would have to be in an event handler that runs when a file is opened. There are examples on the Ask Inga Wiki area.
Charles (Chuck) Rheault CADD Manager
MDOT State Highway Administration