How do I get sheet numbers into the files names on my prints using print organizer?

I'm trying to setup a named expression to, among other things, pull the sheet number from the plotted model and it's not working for me. I'm using the PrintDefinition.SheetNumber symbol but it only returns a value of "0" regardless of what number is set in the sheet number field of the model. Am I missing something or not understanding what that symbol is supposed to do? 

PrintDefinition.ParentFolderName&
IIf(System.String.Length(PrintDefinition.ParentFolderName)=1,System.String.Format ("{0:D3}", PrintDefinition.SheetNumber),System.String.Format ("{0:D2}", PrintDefinition.SheetNumber))
&"-"&System.Path.GetFileNameWithoutExtension(PrintDefinition.SourceFile)

Here is the expression I have setup. It is using the parent folder name for a prefix and then setting the number of places for the sheet number based on if that prefix is only one letter or more. I just can't get it to actually pull the number from the sheet number in the model. If I use ActiveModel.SheetNumber it will find the number, but then it puts the same sheet number from the active model on all the names instead of the number that goes with the corresponding model. 

I'm using V8i SS4 version. 8.11.09.829

Parents
  • Your expression worked as expected for me. By chance are you seeing the zero sheet number in the Named Expression dialog "Test" field? If so, that's expected. For technical reasons, to improve performance and MicroStation startup time, the Named Expression dialog is not linked to the printing system and 'live' data is not accessible. The PrintSet and PrintDefinition symbols evaluate to "[<symbol name>]" for string types and zero for numeric types. The Named Expression dialog Test button can be used to validate the syntax of the expression.

    If you are seeing the zero sheet numbers in the Print Organizer Output File Names / Preview window (or in the output file names themselves), then the cause is likely outdated information in the print definition. When using fixed print definitions, when the print definition is created Print Organizer queries everything it needs from the DGN (view geometry, model/sheet info, etc.) and stores it in the print definition embedded in the PSET. That allows operations such as changing the print size and scale, switching views, etc. to be performed without requiring a time-consumating DGN reload in the background process. All of the values in the PrintDefinition symbol set are taken from this cached data. If you have changed the sheet number in the DGN model properties after creating the print definition, then PrintDefinition.SheetNumber will continue to evaluate to the old value. The solution is to run the "Update from design file" command from the Properties / Advanced dialog, or apply a print style where 'Update from design file' is checked.

    In MS V8i, that's the only option because the ActiveFile symbols cannot be used in the Print Organizer file name expression for you reason you observed. In MS CONNECT Edition, the construction of the Print Organizer output file name has changed such that the ActiveFile symbols can be used. This renders the PrintDefinition.SheetNumber symbol obsolete for the most part.

          
    .

  • I must have something set wrong then. It doesn't work for me. All it will show in the print organizer is a "0" no matter what I do. I have done like you said to Update from design file and even tried creating a new pset. These sheets should be 0001,0002 & 0003 based on the numbers in my sheet properties. I can get it to work if I use PrintDefinition.FolderPrintDefNumber, but that relies on having all of the sheets in the folder. That may work most of the time and I will use it for cross sections where all of the sheets are in one model, but I'd rather have it pull the stored sheet number from the other models if I can figure out how to make it work. 

  • What I have noticed is order to use Sheet Number field in model properties, the sheets model need to be in the same file, what's is not the case.

  • I'm not sure what you mean by this. Linking to the sheet number field is getting the number stored in that field for that particular sheet model. You can have sheet models in different files if you wish though. To say it another way, each sheet model you would print stores it's own sheet number regardless of which file it's in. The benefit of doing it this way is you can manage all of numbers in one place by adding all of the sheet models in your set to the Project Explorer. 

  • It didn't work for me. All sheets show the same sheet number.

  • Are you putting your sheet number for each sheet into this location on the model properties? 

    Whatever number you put in that spot and then use a field to point to that model property will show that sheet number. It's also best to have the "Update Fields Automatically" option turned on. 

    That will work for getting the page numbers on the sheets, but I'll couldn't get the Print Organizer to pull those number out to use in file names. 

  • This is a problem when you need to number 200 sheets starting from 450.

Reply Children
  • Once the field has been setup and placed into each sheet (which can be done by copy and paste) then you can number all of the sheets with one operation, starting at any number you wish, using the Project Explorer. Ideally you would have that field put in when the sheets were created, but it wouldn't take all that long to copy that field into each sheet. Then you would have it all setup so if the sheet numbers ever need to change it would be easy to manage.