Custom - Renaming Expressions

V8i

I am trying to find information to enable the model name to be renamed with a number that is used as the drawing number in each sheet with a text substitution.

I want to increment the number for the multi-sheet printout with print organizer

Can anyone help 

  • Hi,

    Unknown said:
    ...with a number that is used as the drawing number in each sheet with a text substitution

    It's not clear what the mentioned number is. Do you mean Sheet Number defined in sheet properties or it's just a text somewhere in the sheet?

    Unknown said:
    I want to increment the number for the multi-sheet printout with print organizer

    Again, not quite clear: Do you want to rename a model, which is the modification done in design file, or you want to set up Print Organizer that output prints (e.g. in a form of PDF files) will be named using Sheet Number?

    It can help to describe the whole workflow or to provide some example.

    In Print Organizer, you can define Print Output Name using Named Expression easily, but for further help more information about intended output is required.

    With regards,

      Jan

  • I and trying to use the model name from the model properties

     

    and rename using rename by expression by the print organizer using a custom expression.

    The number I want to put in the model name will be placed on the drawing as the drawing number.

    This needs to be incremented by one for each sheet of the set of drawings.

    Thanks

  • Unknown said:
    I and trying to use the model name from the model properties

    ActiveModel.Name is the expression you can use to receive model name.

    Unknown said:
    and rename using rename by expression by the print organizer using a custom expression.

    Please confirm if you want to rename the model, which means the model in the design file will change its name, or you want to use model name as an input for further processing by expressions.

    Unknown said:
    The number I want to put in the model name will be placed on the drawing as the drawing number.

    What is this drawing number and where it comes from? If you mean Sheet Number, it's not available using standard symbol providers delivered with MicroStation, but in this my blog I provided the solution. Or the number comes from the printed model, where it is placed as text or tag?

    Unknown said:
    This needs to be incremented by one for each sheet of the set of drawings.

    If the numbering should be used for print purpose only, I think the same definition as for <print counter> can be used.

    Regards,

      Jan

  • Jan,

    The aim is to use the model name that is substituted in the drawing by a variable using the text substitution capability of the print table. I have a variable name $MNAME$ in the drawing that I will use to put the drawing number on the sheet. To do this I need to have the sheet model name renamed with a number (drawing number).

    By using the rename by expression, I thought I might be able to replace the model name from the sheet properties and increment it for each sheet in the print job.

    If there is a better way to rename the model in the design file I would be thankful for any ideas. I am not concerned if it is a permanent change or happens at the print time in the print organiser dialog.

    Regards

    Trevor

  • Hi Trevor,

    as far as I know, Print Organizer with Named Expressions are separated from print table and variable substitution. So to use the same information, they have to start with the same data source. From this perspective, to start with correctly named models or sheets names is good idea.

    You cannot use Named Expression to rename model and in general to change anything, it's not an intention of this tool (but from a technical point of view, I guess such expression can be developed).

    I think quite simple solution is to create VBA macro, that will go through all sheet models in active design file and will rename it with incrementing numbers. If your naming style is consistent over different files and even projects, such macro would be simple. After models (or sheet names, it's up to you) will be named correctly, you will be able to easily use them both in print table and Print organizer.

    With regards,

     Jan