Scripting > CxDynagraph > CxDynagraph Object > CxDynagraph Methods

CxDynagraph Methods

The CxDynagraph object contains the following methods:

The DataGroup parameter referenced in the table below is an integer that identifies a data group instance to operate on. The possible values are:

AbortAllRequests

The AbortAllRequests method aborts all card poll requests. See Aborting Card Requests.

Syntax

AbortAllRequests()

Back to top

AbortCurrentRequest

The AbortCurrentRequest method aborts all current card poll requests. See Aborting Card Requests.

Syntax

AbortCurrentRequest()

Back to top

AboutBox

The AboutBox method displays an About dialog box for the control.

Syntax

AboutBox()

Back to top

AddCalcMethodFilter

The AdCalcMethodFilter method adds a calculation method filter to limit downhole cards based on relevant calculation type(s) used in a single transaction.

Syntax

AddCalcMethodFilter(CalcType As String)

Parameters

Parameter Required Description

CalcType

Yes

The calculation type(s) used in a single transaction. Options include: Device, Everett-Jennings, and Gibbs.

Back to top

CanGetFromRtu

The CanGetFromRtu method returns true if the user can retrieve data from RTU. The user can retrieve data if they have the necessary security credentials. For card data groups, the user must have necessary security credentials and the EIE must support the particular card type.

Syntax

CanGetFromRtu(DataGroup As Integer) As Boolean

Parameters

Parameter Required Description

DataGroup

Yes

Parameter can be 0 – 10.

Back to top

CanSendToRtu

The CanSendToRtu method returns true if the user can send data to RTU. Pumpoff configuration and fluid fill data can be sent if the user has the necessary security credentials and the data has been read from the RTU already. Reference cards can be sent if the EIE supports writing reference cards and the user has the necessary security credentials.

Syntax

CanSendToRtu(DataGroup As Integer) As Boolean

Parameters

Parameter Required Description

DataGroup

Yes

Parameter can be 0, 5, or 7.

Back to top

 

ChooseFacility

The ChooseFilter method displays a Facility Chooser dialog box and returns the selected facilities in an array.

Syntax

ChooseFacility() As String

Back to top

ChooseSiteService

The ChooseSiteService method displays a Select Service dialog box to select a UIS Site.Service.

Syntax

ChooseSiteService() As String

Back to top

ClearCalcMethodFilters

The ClearCalcMethodFilter method clears a calculation method filter. Results in the display of all available card types.

Syntax

ClearCalcMethodFilters()

Back to top

EditCardTraceSetup

The EditCardTraceSetup method edits a card trace setup. A trace polls current cards at a specified interval for a specified duration, allowing you to closely monitor a well for a short length of time. See Executing a Card Trace.

Syntax

EditCardTraceSetup()

Back to top

EditData

The EditData method presents a dialog that is used to edit pumpoff configuration or fluid fill data parameters and send changes to RTU.

Syntax

EditData(DataGroup As Integer) As Boolean

Parameters

Parameter Required Description

DataGroup

Yes

Parameter can only be 0 or 7.

Back to top

ExportCard

The ExportCard method exports the card to a text or data file. See Saving Cards.

Syntax

ExportCard()

Back to top

ExportCardEx

Syntax

ExportCardEx(ExportFormat As Integer, FileName As String) As Boolean

Parameters

Parameter Required Description

ExportFormat

Yes

 

FileName

Yes

 
Back to top

GetCardCount

The GetCardCount method returns the number of cards of the currently chosen card type that the device has.

Syntax

GetCardCount() As Integer

Back to top

GetCardFromRtu

The GetCardFromRtu method issues a poll for the specified DynaCard data group.

Syntax

GetCardFromRtu(DataGroup As Integer, NumCards As Integer) As Boolean

Parameters

Parameter Required Description

DataGroup

Yes

Parameter can only be 2, 3, 4, 5, 6, 8, 9, or 1

NumCards

Yes

Parameter specifies how many cards to retrieve, can be between 1-5.

Back to top

GetCardPairFromRtu

The GetCardPairFromRtu method issues a poll for the two specified DynaCard data groups.

Syntax

GetCardPairFromRtu(DataGroup1 As Integer, NumCards1 As Integer, DataGroup2 As Integer, NumCards2 As Integer) As Boolean

Parameters

Parameter Required Description

DataGroup1

Yes

Parameters can only be 2, 3, 4, 5, 6, 8, 9, or 10.

NumCards1

Yes

Parameters specify how many cards to retrieve, can be between 1-5.

DataGroup2

Yes

Parameters can only be 2, 3, 4, 5, 6, 8, 9, or 10.

NumCards2

Yes

Parameters specify how many cards to retrieve, can be between 1-5.

Back to top

GetDeviceType

Syntax

GetDeviceType() As String

Back to top

GetDownholeCalcMethods

See IsCalcMethodFilter method.

Syntax

GetDownholeCalcMethods(ByRef arrFilterCriteria)

Back to top

GetFacilityCount

Syntax

GetFacilityCount() As Integer

Back to top

GetFromRtu

The GetFromRtu method issues a poll for the specified data group.

Syntax

GetFromRtu(DataGroup As Integer) As Boolean

Parameters

Parameter Required Description

DataGroup

Yes

parameter can be 0 - 10.

Back to top

GetLastRequestError

Syntax

GetLastRequestError(ErrorText, ErrorTimeUtc, Clear As Boolean) As Boolean

Parameters

Parameter Required Description

ErrorText

Yes

 

ErrorTimeUtc

Yes

 

Clear

Yes

 
Back to top

GetRequestQueueCount

Syntax

GetRequestQueueCount() As Long

Back to top

GetRequestQueueCurrent

Syntax

GetRequestQueueCurrent(DataGroup, FirstCard, LastCard) As Boolean

Parameters

Parameter Required Description

DataGroup

Yes

 

FirstCard

Yes

 

LastCard

Yes

 
Back to top

GetSelectedCardDataElement

The GetSelectedCardDataElement method returns the data value for a data element in the DDS transaction of the currently selected card. Deid is the name of the data element requested and if it is an ordinalized data element (like the load and position values are). Index is the ordinal of the data element to retrieve.

Syntax

GetSelectedCardDataElement(Deid As String, Index As Integer) As String

Parameters

Parameter Required Description

Deid

Yes

The data group element ID (DEID) of the data group element requested and if it is an ordinalized data group element (like the load and position values are).

Index

Yes

The ordinal of the data group element to retrieve.

Back to top

GetSelectedCardDbKey

The GetSelectedCardDbKey method returns the DDS DbKey for the currently selected card.

Syntax

GetSelectedCardDbKey() As String

Back to top

GetSelectedCardToken

The GetSelectedCardToken method returns the token for the currently selected card.

Syntax

GetSelectedCardToken() As String

Back to top

GetSelectedCardXml

The GetSelectedCardXml method returns the XML for the DDS transaction of the currently selected card.

Syntax

GetSelectedCardXml() As String

Back to top

IsCalcMethodFilter

Syntax

IsCalcMethodFilter(arrFilterCriteria As String) As Long

Parameters

Parameter Required Description

arrFilterCriteria

Yes

 
Back to top

IsCardTraceActive

The IsCardTraceActive method determines whether the card trace is active or not. See Executing a Card Trace.

Syntax

IsCardTraceActive() As Boolean

Back to top

IsSelectedCardMostRecent

The IsSelectedCardMostRecent method enables a user to call the function to determine whether the selected card is the most recently retrieved card of its type. Boolean value returned.

Syntax

IsSelectedCardMostRecent() As Boolean

Back to top

Navigate

The Navigate method chooses the next pump off control device for the UIS service if nNavObject is 0, or the next card for the selected device if nNavObject is 1. If bGoForward is True, this will navigate forwards to the next device or the next card, and if bGoForward is False this will navigate backwards to the previous device or previous card. Calling this function causes the CardChange event to fire if the selected device has a card of the set card type.

Syntax

Navigate(NavObject As Integer, GoForward As Boolean)

Parameters

Parameter Required Description

NavObject

Yes

Chooses the next pump off control device for the UIS service (0), or the next card for the selected device (1). Options are 0 or 1.

GoForward

Yes

If set to True, navigate forwards to the next device or the next card, and if set to False this will navigate backwards to the previous device or previous card.

Back to top

Print

The Print method prints the contents of the control, grid, or viewer. When this method is called, the Print dialog box is shown to allow configuration.

Syntax

Print()

Back to top

ProcessChanges

Syntax

ProcessChanges() As Boolean

Back to top

RefreshCards

The RefreshCards method enables you to manually refresh card data and display to see the latest changes. Useful when a dynagraph card depends on another system for calculations, which might create a small lag time in communication between the systems.

Syntax

RefreshCards()

Back to top

RefreshConfig

The RefreshConfig method refreshes the pumpoff configuration display.

Syntax

RefreshConfig()

RefreshDataGroup

The RefreshDataGroup method causes the control to re-read the data group data or status points and refresh the visible values.

Syntax

RefreshDataGroup(DataGroup As Integer)

Parameters

Parameter Required Description

DataGroup

Yes

Parameter can be 0, 1, or 7.

Back to top

RefreshStatus

The RefreshStatus method refreshes the status data display.

Syntax

RefreshStatus()

Back to top

RemoveCalcMethodFilter

Syntax

RemoveCalcMethodFilter(CalcType As String)

Parameters

Parameter Required Description

CalcType

Yes

The calculation type(s) used in a single transaction. Options include: Device, Everett-Jennings, and Gibbs.

Back to top

RemoveCard

The RemoveCard method removes a card from the view set.

Syntax

RemoveCard(bAllCards As Boolean)

Back to top

SaveReferenceCard

The SaveReferenceCard method displays the Save as Reference Card dialog box, allowing you to save the selected card as the most recent reference card in your CygNet system.

Syntax

SaveReferenceCard() As Boolean

Back to top

SelectCards

Syntax

SelectCards()

Back to top

SendToRtu

The SendToRtu method is used to resend pumpoff configuration or fluid fill data that has already been read from RTU.

Syntax

SendToRtu(DataGroup As Integer) As Boolean

Parameters

Parameter Required Description

DataGroup

Yes

Parameter can be 0 or 7.

Back to top

SetDynagraph

The SetDynagraph method sets the UIS service and facility ID for the desired pump off control device. Calling this function causes the CardChange event to fire if the selected device has a card of the set card type.

Syntax

SetDynagraph(SiteService As String, FacilityId As String) As Boolean

Parameters

Parameter Required Description

SiteService

Yes

 

FacilityId

Yes

 
Back to top

ShowCardDetails

The ShowCardDetails method displays the Dynagraph Card Details dialog box, displaying card information and position/load pairs.

Syntax

ShowCardDetails()

Back to top

StartCardTrace

The StartCardTrace method starts a card trace. See Executing a Card Trace for more information.

Syntax

StartCardTrace(Enable As Boolean)

Parameters

Parameter Required Description

Enable

Yes

 
Back to top

ViewDbKey

Syntax

ViewDbKey(DbKey As String)

Parameters

Parameter Required Description

DbKey

Yes

 
Back to top

Let us know how we can improve this topic.

CygNet at weatherford.com

© 2020 Weatherford. All rights reserved.