Quantcast
Channel: MicroStation
Viewing all articles
Browse latest Browse all 54628

Forum Post: RE: Pen Tables - Text Substitution - Windows Short Path

$
0
0
Hey Jan, Thank you very much for your quick response. I was afraid that that might be the answer. I looked for several hours, and didn't have any luck :-( But I was hoping maybe i was just using the wrong search terms. So, if that is not an option perhaps you might have some advice for another method to fix my problem. 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. But, I wonder, would there be a way to trick the alignment? Perhaps by adding trailing spaces in the named expression equal to the length of the path over 70? or inserting a space in a place far away? Or would there be a way to adjust the alignment/location of the tag we are replacing through the pen table, without modifying the border? I am still a novice where it comes to using named expression. Perhaps something like: IIf (System.String.Length (PrintDefinition.SourceFile) 150,"..." & System.String.Substring (PrintDefinition.SourceFile, System.String.Length (PrintDefinition.SourceFile) - 150, -1) & System.String.ADDACOMMANDTHATADDSCHARACTERMULTIPLETIMES(" ",(System.String.Length (PrintDefinition.SourceFile) - 220),-1),PrintDefinition.SourceFile & System.String.ADDACOMMANDTHATADDSCHARACTERMULTIPLETIMES(" ",(System.String.Length (PrintDefinition.SourceFile) - 70),-1)) For my guess this command works like System.String.ADDACOMMANDTHATADDSCHARACTERMULTIPLETIMES("character or string you want inserted",number of times insert the character or string,position you want the character inserted where -1 inserts to the right) The idea of the above string only truncating when it would run over the stamp ( i.e. 150 characters), then adding trailing spaces to move the text to the left because of center justification of the text as needed( i.e. some number of spaces between 150 and 70) Any thoughts or ideas? Thanks again for your responses! Chris

Viewing all articles
Browse latest Browse all 54628

Trending Articles