Bentley Communities
Bentley Communities
  • Site
  • User
  • Site
  • Search
  • User
  • Welcome
  • Products
  • Support
  • About
  • More
  • Cancel
Bentley Map | OpenCities Map
  • Product Communities
  • Geospatial
  • Bentley Map | OpenCities Map
  • More
  • Cancel
Bentley Map | OpenCities Map
Bentley Map | OpenCities Map Wiki - Print Preparation - Using an XML file control output
    • Sign in
    • -Bentley Map | OpenCities Map Wiki
      • -OpenCities Map
        • Working from home with OpenCities Map
        • +Release Information
        • +Installation Information
        • +Getting Started
        • +Administration
        • -General Topics
          • - Activate Bentley Map V8i from Civil Engineering software products
          • - Add a hole to an existing polygon collection
          • - Add a Watermark to a view
          • - Attribute Masking tool
          • - Bentley Map V8i menu guide
          • - Bing Maps
          • - Cartographic Styles Intersection
          • - Clip reprojected image including Bing Maps
          • - Create Print Layout when Adjust Mode is selected
          • - Creating a custom toolbox in V8i
          • - Creating a report in CONNECT Edition
          • - Creating clickable links on Feature Properties (xslt)
          • - Define feature scale ranges
          • - Difference between Remove in the Map Manager and Delete
          • - Dimensions in OpenCities Map
          • - Drop XFM features to MicroStation elements
          • - Edit features in reference (CONNECT Edition only)
          • - Edit features in reference (V8i only)
          • - Edit print model legend
          • - Find and Replace in Data Browser
          • - Find Slivers
          • - Generating thematic classes
          • - Key-in to set view scale
          • - Labeling - Rounding and/or converting numerical properties
          • - Labeling VS Annotation
          • - Level Symbology key-ins
          • - Print Preparation - Tools and drop-downs missing from ribbon group
          • - Print Preparation - Using an XML file control output
          • - Print Preparation - Viewport Scales
          • - Print Preparation - To set template file and model with key-in
          • - Round off automatically generated geometry values
          • - Saving spatial locations
          • - Sharing feature properties with other Bentley desktop software
          • - Transform elements using Warp
          • - Use Color Table preference not working
          • - VBA Programming Resources
          • - WFS Flip Coordinates
        • +Geospatial Administrator
        • +Interoperability
        • +Spatial Databases
        • +Spatial Analysis
        • +3D Geospatial
        • +Geographic Coordinate Systems
        • +Troubleshooting
        • +Freeware - Utilities - Applications - Programs
        • +Advanced Map Finishing
        • +Bentley Cadastre
      • Bentley Descartes
      • +Other Geospatial Products
      • +Bentley Map Mobile
      • +Bentley Map Mobile Publisher

     
     Questions about this article, topic, or product? Click here. 

    - Print Preparation - Using an XML file control output

    ~ In progress

    For all automation that does not require user input, you can control the entire process of Print Preparation output from an XML configuration file passed to the application. The file contains all information about the printprep viewports and printprep text placeholders. The quickest approach is to create a file from an existing output model created by the printprep application. To do this, use the key-in: printprep writexmlconfig

    In this example, the file ...\PrintPrep@PrintPrepOutput.xml is create which can be used as the basis for your automation by modifying the contents. 

    <?xml version="1.0" encoding="UTF-8"?>
    <framecfg>
        <info>
            <version>1</version>
        </info>
        
        <options>
            <!-- batchmode activates processing the template without any user interaction -->
            <!-- Note that it turns off editing for text placeholders -->
            <batchmode>1</batchmode>
        </options>
        
        <files>
            <!-- use this file as template. The filename may contain environment variables -->
            <seedmodel>$(MY_TEMPLATE_PATH)MyTemplates.dgnlib\MyModelName</seedmodel>
        </files>
        
        <texts>
            <!-- list all text placeholders you want to configure differently.  E.g. change the environment variable that should display as text content -->
            <text key="6" editable="1" mode="1" guid="851b268b-076d-411f-9c6a-7a1fbf5781c5" arg="MS_GEOPRINTPREP_DGNLIB"/>
            
            <!-- or provide the text content in arg while setting mode to 4 --> 
            <text key="3" editable="1" mode="4" arg="My Text Override" />
    
            <!-- original node content when saving with keyin FRAMELIB WRITEXMLCONFIG MS_PRINTPREP_APITEST -->
            <!-- text key="15" editable="0" mode="1" guid="851b268b-076d-411f-9c6a-7a1fbf5781c5" arg="_DGNFILE"/-->
            <text key="15" editable="0" mode="4" arg="This was the placeholder for variable _DGNFILE"/>
        </texts>   
        
        <areas>
            <!-- to predefine the area which is displayed as viewport content for viewport with key=1, set the mode to 8 and specify scale, rotation and origin in masterfile coordinates -->
            <area key="1" name="Rahmen" mode="8" scale="3456.000000" rotation="30.000000" >
                <origin x="-751.67" y="550.82" />
            </area>
        </areas>
        
    </framecfg>

    This configuration file is used to override the existing settings. You can therefore strip all information from XML configuration that you do not want to modify.  To start print preparation and create your output model from the active model, use this key-in:

    printpreparation workflow runbatch <PathToXmlConfigurationFile>

    To create PDF output along with the output model put an XML-Element inside the <files> section

    <pdffile>YourOutputFullPath</pdffile>

    • Share
    • History
    • More
    • Cancel
    • Inga Morozoff Created by Bentley Colleague Inga Morozoff
    • When: Tue, Apr 16 2019 11:46 AM
    • Inga Morozoff Last revision by Bentley Colleague Inga Morozoff
    • When: Tue, Apr 16 2019 3:54 PM
    • Revisions: 7
    • Comments: 0
    Recommended
    Related
    Communities
    • Home
    • Getting Started
    • Community Central
    • Products
    • Support
    • Secure File Upload
    • Feedback
    Support and Services
    • Home
    • Product Support
    • Downloads
    • Subscription Services Portal
    Training and Learning
    • Home
    • About Bentley Institute
    • My Learning History
    • Reference Books
    Social Media
    •    LinkedIn
    •    Facebook
    •    Twitter
    •    YouTube
    •    RSS Feed
    •    Email

    © 2021 Bentley Systems, Incorporated  |  Contact Us  |  Privacy |  Terms of Use  |  Cookies