InterPlot Pattern Libraries [TN]

 Applies To 
 Product(s):ProjectWise InterPlot
 Version(s):InterPlot Client, InterPlot Professional, InterPlot Server 9.1, 10.X
 Environment: N/A
 Area: N/A
 Subarea: N/A
 Original Author:Bentley Technical Support Group










Pattern Libraries

Pattern libraries are collections of area fill patterns. Each pattern has a name, size, rotation and graphical definition. The graphical definition is a 1-bit raster image. IPLOT uses only raster pattern libraries; APLOT supports both metafile pattern libraries and raster pattern libraries. Raster pattern libraries are not valid with vector devices.

Separate patterns need to be drawn for each unique plotter resolution. For example, for a 300 dpi plotter, you should make the raster file pattern size 300x300 pixels. For a 600 dpi plotter, you should make the raster file pattern size 600x600 pixels. By default, 4 pattern libraries are delivered for each resolution: pat100.plb, pat300.plb, pat400.plb, and pat600.plb.

Using Pattern Libraries

You must use a pen table or feature table to plot elements with the patterns stored in pattern libraries. When you assign a pattern to an element, you can also define its foreground and background colors.

The following IPLOT pen table fills all shaped elements on Level 1 with a blue and yellow hatch pattern:

  if ((level == 1) && (type == shape)) then         area_fill = true         pattern = 'hatch'		# pattern name         fill_color = 'blue'		# background color         pattern_color = 'yellow'	# foreground color  endif

The following APLOT pen table fills all closed polylines with a blue and yellow hatch pattern:

  if ((entity_type == polyline) && (closed == true)) then       area_fill = true       pattern = 'ansi31' 		# pattern name        pattern_color = 'yellow'   	# pattern color            color = 'blue'			# background color                endif


Creating a Raster Pattern

This is the process for creating a raster pattern:

  1. Create the graphical representation for the pattern.

    You can draw the graphical representation with a raster editor like Paint Shop ProTM. Create a 1-bit raster image (TIFF is the recommended format). Be sure to create graphical representations for each unique plotter resolution.


  2. If you would like to add your pattern to an existing pattern library, proceed to Step 3.

    To create a new pattern library, choose the name for the library. The extension .PLB is used to indicate that the file is a pattern library. Use the IPLOT pattern library editor (plib) or the APLOT pattern library editor (applib) as follows:

    											  plib cre iplotpat400.plb  applib cre aplotpat400.plb						


  3. Add your pattern to an existing library, or to the new one created in Step 2.
    											  plib add -entry=mypat1 -file=mypattern.tif iplotpat400.plb  applib add -entry=mypat1 -file=mypattern.tif aplotpat400.plb						
    This example adds a pattern to the 400 dpi pattern library. The graphical representation should have been created at a resolution of 400 dpi.


  4. Set the pattern size to 1 inch. The default units setting is centimeters and the default size is 1 cm. The maximum size is 4 centimeters, or about 1.575 inches.
    											  plib modify -entry=mypat1 -size=1 -units=in iplotpat400.plb  applib modify -entry=mypat1 -size=1 -units=in aplotpat400.plb						


  5. To use the new pattern, copy the pattern library containing the pattern to the c:\Program Files\Common Files\InterPlot\iplot\resrc\custom directory for IPLOT or c:\Program Files\Common Files\InterPlot\aplot\resrc\custom directory for APLOT. It is recommended that you maintain a backup copy in a different directory.

Configuration Variables (iplotsrv.cfg) IPLOTSRV_PATTERN_LIB_LIST
This variable contains a list of InterPlot pattern library names IPLOT Server reads to resolve pattern name references in pen and feature tables. Multiple library filenames may be specified within this variable, denoting different pattern libraries for different device resolutions. The format is <filename>,<dpi>;<filename>,<dpi>;... For example, the definition IPLOTSRV_PATTERN_LIB_LIST = LoRes.plb,100;MedRes.plb,300;HiRes.plb,600 causes IPLOT Server to use patterns defined in LoRes.plb when plotting to the 100 dpi preview window, but use the patterns in HiRes.plb when plotting to a 600 dpi laser printer. When selecting a library out of this list, IPLOT Server selects the first entry whose resolution matches the target device. If an exact match is not found, IPLOT Server always picks the highest resolution available that does not exceed the device resolution.

This variable contains the directories that will be searched for the filenames specified by IPLOTSRV_PATTERN_LIB_LIST. When adding your own custom patterns, it's recommended that you copy the default *.plb files from resrc\system into resrc\custom. You may then add your new bitmap patterns to the resrc\custom\*.plb libraries. IPLOT Server will use the libraries found in resrc\custom without you having to modify this configuration file and your modified libraries will not be overwritten when re-installing the product.

This variable can be used to invert the foreground and background colors for all raster patterns plotted by IPLOT Server. You may need to set this variable to true if you are using custom pattern libraries derived from the default libraries delivered with InterPlot 9.1. This variable is false by default, meaning patterns are not inverted.

Configuration Variables (aplotsrv.cfg) APLOTSRV_PATTERN_LIB_PATH
This variable specifies the directories that are searched for the pattern library specified in the APARM. If no library is specified or the one specified is not found, the library defined in the APLOTSRV_DEFAULT_PATTERN_LIB variable is used instead.

This variable defines the pattern library that will be used if no library is specified in the APARM or the one specified is not found.

This variable contains a list of InterPlot raster pattern library names APLOTSRV reads to resolve pattern name references in pen tables. If this variable is defined, it takes precedence over both the pattern library name stored in the APARM, and the value of the APLOTSRV_DEFAULT_PATTERN_LIB variable. Uncomment this variable definition if you wish to use the same raster pattern libraries that IPLOTSRV uses.


Additional Tips


See Also

Product TechNotes and FAQs

ProjectWise TechNotes And FAQs

External Links

Bentley Technical Support KnowledgeBase

Bentley LEARN Server

Comments or Corrections?

Bentley's Technical Support Group requests that you please confine any comments you have on this Wiki entry to this "Comments or Corrections?" section. THANK YOU!