pywellcad

COM API

  • Application
  • Borehole
  • Log
  • Title
  • Depth
  • Page
  • Header
  • CommentBox
  • IntervalItem
  • LithoBed
  • LithoDictionary
  • LithoPattern
  • FossilItem
  • Structure
  • MarkerItem
  • CrossSectionBox
  • PolarAndRoseBox
  • StackingPatternItem
  • DrillItem
  • EquipmentItem
  • Workspace
  • Font
  • Odbc
pywellcad
  • Header
  • View page source

Header

class wellcad.com.Header(dispatch)

The class that manages the headers fields.

Example

>>> header = borehole.header
>>> for i in range(header.nb_of_items):
>>>     print(header.item_name(i))
COMPANY
Title
STATE
FIELD
Features
email
Complementary1
Complementary2
Tools
allow_export_header(index, enable, password)

Changes the protection status to export the header design

When dealing with a protected document you can use this method to enable / disable the protection to export the header attached to a borehole document as a WCH file. This assumes you are in possession of the password. You still have to export the header manually, this method only toggles the protection.

Parameters:
  • index (int) – index of the sub-header

  • enable (bool) – Set this boolean to True to allow the export of the header. Set it to False to protect the header again.

  • password (str) – String of the password needed to make changes to the protection level of a header.

allow_export_trailer(index, enable, password)

Changes the protection status to export the trailer design

When dealing with a protected document you can use this method to enable / disable the protection to export the trailer attached to a borehole document as a WCH file. This assumes you are in possession of the password. You still have to export the trailer manually, this method only toggles the protection.

Parameters:
  • index (int) – index of the sub-trailer

  • enable (bool) – Set this boolean to True to allow the export of the trailer. Set it to False to protect the trailer again.

  • password (str) – String of the password needed to make changes to the protection level of a trailer.

get_item_text(name)

Contents of a dynamic text field in the header.

Parameters:

name (str) – ID of the text field as entered in HeadCAD.

Returns:

The text contained in the dynamic text field.

Return type:

str

item_name(index)

Returns the ID of a dynamic text field.

Returns the ID of a dynamic text field in the header based on the zero based index. Use GetNbOfItems to retrieve the total number of text fields in the header.

Parameters:

index (int) – Zero based index of the dynamic text field.

Returns:

The ID of the dynamic text field.

Return type:

str

property nb_of_items

Number of dynamic text fields in the entire header.

Type:

int

set_item_text(name, text)

Adds the content of a dynamic text field in the header.

Parameters:
  • name (str) – ID of the text field as entered in HeadCAD.

  • text (str) – Text to add into the dynamic text field.

Previous Next

© Copyright 2021-2024, Advanced Logic Technology.

Built with Sphinx using a theme provided by Read the Docs.