How to successfully place text from a Batch Process command file?

MicroStation CONNECT Edition Update 14 - Version 10.14.00.109

I have over 300 text elements I need placed in a drawing. I've studied the process for running a Batch Process in Microstation and I've created a commands file of the following format:

place text;some text;xy=1,2,3
place text;some other text;xy=1,3,2
...

Placing text with these commands works directly in a drawing via the key-in box. However, it fails when run from a batch file. In the Message Center, I see "Insufficient arguments" appearing repeatedly, and no text is placed within the drawing. The "place text" tool does start, but no text is placed. 

What do I need to do differently in order to place these texts in the drawing via a batch process?

From the below link, I have found perhaps a hint at my problem, which is that there are other parameters to be specified for the place text tool vis-à-vis text styles, etc.

https://communities.bentley.com/products/microstation/f/microstation-forum/172094/how-to-place-a-text-by-using-key-in-scripts-in-two-or-more-files-using-batch-process

If I'm right in this suspicion, the question becomes how to specify the necessary text style or other parameters via key-in, which I haven't been able to ascertain from interacting with the key-in box.

Any help appreciated,

Thanks

Parents
  • I found the problem, and it turned out to be something that nobody could have discerned from the information provided. To wit: I had pound symbols (#) in my text for point numbers, which are comment symbols in the Batch Process scripts. Even though I knew this from the documentation on Batch Processes, it didn't occur to me to check my commands file, partly because the same command works when pasted directly in the key-in, as stated in the question. 

    I was also having issues with newlines, which are represented in the place text command by "\101", although this wasn't directly causing my problem. There seems to be some kind of bug where, once a text element is placed which involves this newline code, the rest of the text elements can't have different text values.

    My solution was to replace the # symbols and the newlines with some substitute symbols, importing the text elements, and then replacing the substitute symbols as necessary using the Find/Replace Text tool.

    Also, a good thing to note for future batchers is that @scripts are much easier to use than the Batch Process utility, as noted by Jon Summers below.

    Answer Verified By: Corey Anderson 

  • the batch processor is best used for doing the same thing to multiple files and will run  the series of commands in the batch script (  not exactly the same function as a plain script file run from keyin window with the @  symbol)  and it will open and close files and run the commands faster than you can manually hence for big jobs its great.

    Also we tend to put one command per line and hit enter ...

    you can even put macros inside the batch processor ie after you placed the text you can  have a macro to run the find replace to put back in your # symbol and run it over 100's of dgns... you can even have more than one macro inside the batch processor... its old tech so limits on things like # .. but its worth mastering how the batch processor works .. I use it alot to fix up drawings etc  like replace text , replace fonts  and  my favorite fit view  and save design in every file in the folder...

    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 

Reply
  • the batch processor is best used for doing the same thing to multiple files and will run  the series of commands in the batch script (  not exactly the same function as a plain script file run from keyin window with the @  symbol)  and it will open and close files and run the commands faster than you can manually hence for big jobs its great.

    Also we tend to put one command per line and hit enter ...

    you can even put macros inside the batch processor ie after you placed the text you can  have a macro to run the find replace to put back in your # symbol and run it over 100's of dgns... you can even have more than one macro inside the batch processor... its old tech so limits on things like # .. but its worth mastering how the batch processor works .. I use it alot to fix up drawings etc  like replace text , replace fonts  and  my favorite fit view  and save design in every file in the folder...

    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 

Children
No Data