InterPlot Organizer Text Substitution

We use InterPlot Organizer to create PDFs of our Microstation drawings.

We are currently using a design script to substitute placeholder text for the current page number and total pages to create a "Sheet X of X" text field. The same script substitutes text for a time stamp and file location. There are obvious IPLOT keywords for those substitutions. I am wondering if there is a way to substitute a "Continued On" text to the next page in the Organizer? This would save us from manually updating sheets when new sheets are added to the project since they are not always added to the end.

If there are no keywords for this, I was thinking the other option may be to create an .ips file using command line inputs, which I have just started investigating. Going this route, is there a way to add a sheet level variable via the command line inputs? The design script could then be modified to use this new variable to substitute the text when the PDF is created.

We are using InterPlot Organizer CONNECT Edition 10.00.02.29.

  • Um, I kind of went down a rabbit hole on this and I expanded the scope a bit and have a script that can handle arbitrary page offsets.

    Below is a design script that will take text placed like:

    • CONTINUED ON -1
    • CONTINUED ON +1
    • CONTINUED ON +5

    and on the plot that turns into (if the current page is page 1):

    • CONTINUED ON PAGE 0
    • CONTINUED ON PAGE 2
    • CONTINUED ON PAGE 6

    Basically the numbers after CONTINUED ON are added to the current page number. Negative numbers work so if you have a "continued on" on the left side where it's continued from the previous page. The + are optional, but I thought it made it easier to see it was an offset instead of a page number.

    if ((type == text) and (characters == "Continued On*")) then
    	# use regex to get numbers from characters (incuding negative sign)
    	extract_envr_variable="PageOffset"
    	extract_envr_expression="-*[0-9]+"
    	extract_envr_value=characters
    
    	# 1st save current page number in the characters
    	characters = PAGE_NUMBER
    
    	# variable to hold the destination page number
    	envr_variable="NewPageNum"
    	# put the current page number into the variable
    	envr_value = characters
    
    	# now get the offset and put it in chracters
    	envr_variable="PageOffset"
    	characters = envr_value
    
    	# Set the variable back to the new page number
    	envr_variable="NewPageNum"
    	# manually add the number found in the original string
    	# you'll need to add new numbers as needed
    	switch (characters)
    		case "-1" ?
    			envr_value_num = envr_value_num - 1
    		case "1" ?
    			envr_value_num = envr_value_num + 1
    		case "2" ?
    			envr_value_num = envr_value_num + 2
    		case "3" ?
    			envr_value_num = envr_value_num + 3
    		case "4" ?
    			envr_value_num = envr_value_num + 4
    		case "5" ?
    			envr_value_num = envr_value_num + 5
    		default ?
    			envr_value = "UNDEFINED"
    			color = "red"
    	endswitch
    	characters = "CONTINUED ON PAGE " + envr_value
    endif
    

    This is what I have in my test.dgn:

    And this is how the PDF came out:

    If you don't need arbritrary offsets and only need say -1 and +1 you can test for those strings directly and do simple math. Here's that script:

    if (type == text) then
    	if ((characters == "CONTINUED ON +1") or (characters == "CONTINUED ON 1")) then
    		# 1st save current page number in the characters
    		characters = PAGE_NUMBER
    	
    		# variable to hold the destination page number
    		envr_variable="NewPageNum"
    		# put the current page number into the variable
    		envr_value = characters
    		envr_value_num = envr_value_num + 1
    	endif
    	if (characters == "CONTINUED ON -1") then
    		# 1st save current page number in the characters
    		characters = PAGE_NUMBER
    
    		# variable to hold the destination page number
    		envr_variable="NewPageNum"
    		# put the current page number into the variable
    		envr_value = characters
    		envr_value_num = envr_value_num - 1
    	endif
    
    	# Final text to plot
    	characters = "CONTINUED ON PAGE " + envr_value
    endif
    

     

  • Thank you. Unfortunately, while I see the usefulness of your answer, it does not quite answer my question. The ambiguity is my fault. To clarify my above question, the "Continued On" text would be the next Plot Name in the Organizer.

    So, for example if you had a plot set of three drawings with the Plot Names of A1, A2, A3, the "Continued On" text would be "Continued On A2", "Continued on A3", and sheet A3 would not have a "Continued On" since it is the last sheet in the set.

  • Ah, that's beyond the scope of text substitution. Neither design scripts nor pen tables can reference information outside of their own sheet.

    If you're using connect you can accomplish what you want with the Sheet Index and Fields. Then when you insert a sheet in the sheet index and update the names the text will automatically update with the new name as well.

    Sheet Index info:

    docs.bentley.com/.../GUID-AE647EEE-6773-4390-A93D-EFD7F8AB6FDC.html

    Text Fields:

    docs.bentley.com/.../TextFields.html

     

  • @Kevin - Thank you for the answer. You confirmed my suspicions that scripts were confined to their own sheets and unfortunately know nothing of the other sheets in the project other than the total number of sheets. We are using Connect, so I will have to look into Sheet Index and Fields.

    I did have one other thought as to how this could work if the functionality exists in InterPlot Organizer. We use a database in our process. The database knows the sheet names, CAD file locations, and sort order. At a certain point in our process we create an Index in the database and populate fields on the Index .dgn files. Currently we manually sort our sheets in the Organizer. I am thinking we could take this information from the database and create a command file to run with the iplotorg.exe command line interface. I have tested this and we can easily create an IPS file with the sheets sorted and setting files applied.

    In the command line interface is there a way to create a sheet level variable? I see there is a Variables tab in the sheet properties. The same process that creates our Index could output the Continued On sheet. That Continued On sheet variable could then be referenced by a design script to substitute the text. (If there is not a way to create a new variable is there a way to assign something to an existing variable? For example, we currently do not use the discipline or sheet_num variables.)

    Looking in the help file, I feel like the -environment qualifier may be able to accomplish this, but every time I have tried to use it, it doesn't seem to do anything.

  • I think the -Environment option is supposed to do it, but for me it doesn't work either. I got it to work by create a .set file for each sheet i was adding to the set, and telling IplotOrg to use that set file for each plot.

    So using ar1.dgn and ar2.dgn in the Iplot Organizer Learn directory I created ar1.set and ar2.set (I create these a text files so it's easy to do this programmatically with your database info):

    AR1.SET
    ===
    -environment=[PrevSheet="AR0",NextSheet="AR1"]
    
    AR2.SET
    ===
    -environment=[PrevSheet="AR1",NextSheet="AR3"]
    

    Then I created an IPS using this command line:

    "c:\Program Files (x86)\ProjectWise InterPlot Organizer\bin\iplotorg.exe" create -add_plot[AR1]=["c:\Program Files (x86)\ProjectWise InterPlot Organizer\learn\ar1.dgn",ar1.set] -add_plot[AR2]=["C:\Program Files (x86)\ProjectWise InterPlot Organizer\learn\ar2.dgn",ar2.set] testfile.ips

    Once I did that, opening the testfile.ips and double-clicking a sheet and going to the Variables tab you can see the values. Also you can customize Iplot Org to show you the columns in the main view:

    You do that by editing the ip.cfg file in c:\Program Files (x86)\ProjectWise InterPlot Organizer\config\ip.cfg. Comment out the existing IP_ENVR_COLUMNS entry and add your own in the format "Column Name,variable_name;Column2 name,variable2_name"

    #IP_ENVR_COLUMNS = "Discipline,DISCIPLINE;Sheet Number,SHEET_NUM"
    IP_ENVR_COLUMNS = "Next Sheet,NextSheet;Previous Sheet,PrevSheet"
    

     

    Answer Verified By: Brian Loughry