Search

Data Extraction for Accounting and Digital Archive Attributes

Support

<< Return to Index
Subject: Data Extraction for Accounting and Digital Archive Attributes
Product: Digital InterPlot/InterPlot Client v08.01.XX.XX
Operating System: All
Document Number: 8291

You can use a pen table to extract data from MicroStation design files and AutoCAD drawing files. This data is written to the InterPlot Accounting file and can also be used for indexing drawings into the digital archive.

IPLOT Pen Tables for use with MicroStation design files
The tag_set and tag_name assignment keywords are used to specify tag set and tag name for later use by one of the comparison keywords.

The tag keywords check the tag data attached to the current element:

  • tag_display - checks to see if a particular type of tag is displayed
  • tag_character - tests the actual tag's value
  • tag_integer - tests the actual tag's value
  • tag_real - test the actual tag's value

If tag data is not attached to the current element, the tag_character keyword evaluates to "NO_TAG_CHARACTER", while tag_integer and tag_real evaluate to NO_TAG_NUM.

The tag_character, tag_integer, and tag_real comparison keywords must be used with the tag_set and tag_name assignment keywords.

The envr_value assignment keyword sets the current envr_variable to the specified string. This variable=value pair is then written to the accounting file and can also be used as attribute data in a digital archive.

The envr_variable assignment keyword selects the IPARM environment variable you want to use in the pen table. The comparison keyword envr_value can be used to check the value of the variable.

Example 1

! This IPLOT pen table sets a plot sheet attribute based on the characters stored
! in the value field when the tag is attached to an element in the design file.  This
! pen table is based on a tag set named "tline" containing the tag names "city",
! "county", and "state".  The archive contains plot sheet attributes named "City",
! "County", and "State".  The tag is associated with the border cell.

tag_set = 'tline'
tag_name = 'city'
if (tag_character <> "NO_TAG_CHARACTER") then
 envr_variable = "City "
 envr_value = tag_character
endif
tag_name = 'county'
if (tag_character <> "NO_TAG_CHARACTER") then
 envr_variable = "County "
 envr_value = tag_character
endif
tag_name = 'state'
if (tag_character <> "NO_TAG_CHARACTER") then
 envr_variable = "State "
 envr_value = tag_character
 
endif

Example 2

! This IPLOT pen table sets a plot sheet attribute based on the characters stored
! in text elements in the design file. This pen table is based on a tag set named
! "dpr".  The set contains the tag names "account" and "project".The archive
! contains plot sheet attributes called "Account1", and "Project1".  Each tag name
! is associated with a different text element.  The tag name account is associated
! with the text element 123-456-789 and contains a tag value "Account Number:"
! and the tag name project is associated with the text element Color Landscape
! and contains a tag value "Project Name:".   

tag_set='dpr'
tag_name='account'
if (tag_character == "Account Number:") then
 envr_variable = "Account1"
 envr_value = characters
endif
tag_name = 'project'
if (tag_character == "Project Name:") then
 envr_variable = "Project1"
 envr_value = characters
endif

Example 3

! This IPLOT pen table is a variation of Example 2.  The plot sheet attribute is set
! to the value of all text elements associated with the tag name by concatenating
! the values.  

tag_set='dpr'
tag_name='account'
if (tag_character == "Account Number:") then
 envr_variable = "Account1"
 envr_value = envr_value + " " + characters
endif
tag_name = 'project'
if (tag_character == "Project Name:") then
 envr_variable = "Project1"
 envr_value = envr_value + " " + characters
endif

APLOT Pen Tables for use with AutoCAD drawing files
The envr_value assignment keyword sets the current envr_variable to the specified string. This variable=value pair is then written to the accounting file and can also be used as attribute data in a digital archive.

The envr_variable assignment keyword selects the APARM environment variable you want to use in the pen table. The comparison keyword envr_value can be used to check the value of the variable.

Example 4:

! This APLOT pen table sets a plot sheet attribute based on the characters stored
! in text entities in the drawing file. The criteria to determine which text contains
! the appropriate characters is based on layer.  The archive contains plot sheet
! attributes called "Account", "Project", and "Revision".   

if ((entity_type == text) and (layer == "account")) then 
 envr_variable = "Account" 
 envr_value = characters 
else if ((entity_type == text) and (layer == "project")) then 
 envr_variable = "Project" 
 envr_value = characters 
else if ((entity_type == text) and (layer == "revision")) then 
 envr_variable = "Revision" 
 envr_value = characters 
endif 


NOTE: The files used for this TechNote can be found at the following link:

ftp://ftp.bentley.com/dist/plotcivil/plot/extractTN.zip

 

8291

How useful was this page?
less
  more
Suggest new content or let us know how we can improve this content (optional):

<< E-mail this page