Hi all,
Would it be possible for me to use a pen table, text substitution, named expression combination in order to text substitute the windows short path of the dgn location I am printing from?
If possible, I would like text substitution result to look something similar to:C:\PROGRA~2\MICROS~2\Office15\INFOPA~1\INFOPA~3\INFOPA~1\dgnnumber.dgn
I have limited space available for the path, in the border (dictated by client standards), and my companies standards make the path quite long.To add an additional wrinkle, the files are located on a network drive.
Unfortunately, FileL , FileA , and FileSdo not give me the results I am looking for.I am definitely open to alternative suggestions, but If possible I would like to avoid VBA to avoid software changes outside of MicroStation effecting functionality.
The closest answer I have come up with is to truncate the path using this named expression:
IIf (System.String.Length (PrintDefinition.SourceFile) > 70, System.String.Substring (PrintDefinition.SourceFile, System.String.Length (PrintDefinition.SourceFile) - 70, -1),PrintDefinition.SourceFile)
But the above has the drawbacks of loosing critical drive location information on the left end of the path.
Currently, we are using MicroStation V8i (SELECTseries 3) - Version 08.11.09.459
Thanks for your help in advance,
Chris
Bentley Accredited Developer: iTwin Platform - AssociateLabyrinth Technology | dev.notes() | cad.point
I suppose you have tried smaller font to put the full long path?
Seems a bit strange that you have to do this as it wont mean anything when the client gets the files in cad because it will change when they store them elsewhere, but I have a sneaky low down dirty fix for your prints..
put
C:\PROGRA~2\MICROS~2\Office15\INFOPA~1\INFOPA~3\INFOPA~1\
or whatever its meant to be (it cant start with c:\ right was just example)
as text in front of but not part of $FileS$
The end result will look like what you want not perfect but heck if it cant be done what do they your masters expect...
you do this only in the title block ref file so its global and save a copy of the xref title block in the same folder as these drawings live so it doesnt change the one you use for all drawings using same company std title block elsewhere
Lorys
Started msnt work 1990 - Retired Nov 2022 ( oh boy am I old )
But was long time user V8iss10 (8.11.09.919) dabbler CE update 16 (10.16.00.80)
MicroStation user since 1990 Melbourne Australia.click link to PM me
Hey Lorys, Thank you very much for your suggestion.
Unfortunately, they are pretty strict on font size.
We did bat around changing our standard workflow to include a different configuration project by project rather than client by client. But since we are sometimes working of 5 or more different projects in a day, sometimes more we we're concerned that it would lead to too many unforced errors :-) We also thought about changing our local border files with a permanent path. And, in a pinch, I thank that is what we will do as a last resort. But that is so easy to mess up. And, since we do move the files around quite a bit, we would have to be very careful with the pcf and/or border files Also, I am so forgetful :-) So, I like to try to automate if I can. :-) I do plan on working with our client on a few minor changes that would make our life easier ( and there's), but the next update of the border and seed files is still a bit off for them. Thanks, Chris
Hi Chris,
Unknown said:The biggest issue I think, is that the text that I am replacing is center center justified, and based on the location of the tag, above a certain length it would go off the edge of the page(say 70 characters), and above an even longer length (say 150 characters) it would interfere with another standard stamp.
It sounds like more complex issue than just to convert Windows path to old 8.3 format.
To design the best solution more detail knowledge of the specific situation, requirements and conditions (can be tags moved, has to be implemented using plot preprocessing only etc.).
Unknown said:I am still a novice where it comes to using named expression.
Named expression (NE) is nothing else than function that can be called in different situations that are defined by MicroStation itself. NE cannot change design file content (well, I guess it can, but no such NE exists and it's not their intention and such NE can be potentially dangerous). It's possible also to develop own NE, but relevant information is not part of public SDK.
Unknown said:Any thoughts or ideas?
I don't want to change the main discussion question and to enlarge it to complex vague topic. If talking about your original question, you can try the attached symbol provider: I quickly modify some my testing code, so be aware no guarantee is provided.
How to use it:
Configuration variables:
MS_ADDINPATH > <path to folder with dll file>/ ... e.g. MS_ADDINPATH > $(_USTN_PROJECTDATA)splibs/ MS_SYMBOLPROVIDER_APPS > LabTech.SymbolProvider
If it will work, it should looks like this:
With regards,
Jan
LabTech.SymbolProvider.zip