C# Класс SharpPlant.SharpPlantReview.SprApplication

Provides methods and properties for interacting with SmartPlant Review.
Наследование: IDisposable
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
Activate ( ) : void

Brings the SmartPlant Review application to the foreground.

Annotations_Add ( List annotations ) : void

Adds a list of annotations into the Mdb annotation table.

Annotations_Add ( SprAnnotation anno ) : void

Adds an annotation directly into the Mdb annotation table.

Annotations_Delete ( string type ) : void

Prompts a user to delete an annotation in the SmartPlant Review main view.

Annotations_DeleteAll ( ) : void

Deletes all the annotations from the active SmartPlant Review session.

Annotations_DeleteType ( string type ) : void

Deletes all the annotations of a specified type from the active SmartPlant Review session.

Annotations_EditLeader ( SprAnnotation &annotation ) : void
Annotations_EditLeader ( int annoNo ) : void
Annotations_Get ( int annoId ) : SprAnnotation

Retrieves the desired annotation from the Mdb text_annotations table.

Annotations_Place ( SprAnnotation &anno ) : void

Toggles annotation display in the SmartPlant Review application main window.

Creates a new data field in the Mdb text_annotations table. Returns true if the field already exists.

Prompts a user to place a new annotation in the SmartPlant Review main view.

Annotations_Select ( string type ) : SprAnnotation

Prompts a user to select an annotation in the SmartPlant Review main view.

Annotations_Update ( SprAnnotation anno ) : bool

Updates annotation data directly in the Mdb text_annotations table.

Annotations_Update ( object stateInfo ) : void

Updates annotation information directly in the Mdb text_annotations table, queueable from the threadpool.

Connect ( ) : bool

Connects to a running instance of SmartPlant Review.

Dispose ( ) : void

Releases the connection to the SprApplication.

Exit ( ) : void

Exits the SmartPlant Review application.

Export ( string vueName ) : void

Exports the current session to a VUE file format. Compatible only with SPR versions 9 and above.

ExportPdf ( int quality, string path ) : void

Compatible only with SPR versions 9 and above.

GetCenterPoint ( ) : SprPoint3D
GetObjectData ( int objectId ) : SprObject

Uses an Object Id to retrieve detailed object information.

GetObjectData ( string prompt ) : SprObject

Prompts a user to select an object inside SmartPlant Review. Retrieves object information from the selected object.

GetObjectData ( string prompt, bool singleObjects ) : SprObject

Prompts a user to select an object inside SmartPlant Review. Retrieves object information from the selected object.

GetObjectId ( string prompt ) : int

Prompts a user to select an object inside SmartPlant Review. Retrieves the Object Id of the selected object.

GetObjectId ( string prompt, SprPoint3D &refPoint ) : int

Prompts a user to select an object inside SmartPlant Review. Retrieves the Object Id of the selected object.

GetPoint ( string prompt ) : SprPoint3D

Prompts a user to select a point inside SmartPlant Review. Retrieves the physical point selected on screen.

GetPoint ( string prompt, SprPoint3D targetPoint ) : SprPoint3D

Prompts a user to select a point inside SmartPlant Review. Retrieves the physical point selected on screen.

GlobalOptionsGet ( int option ) : double

Gets the value of a specified global option in SmartPlant Review.

GlobalOptionsSet ( int option, int value ) : void

Sets the value of a specified global option in SmartPlant Review.

HighlightClear ( ) : void

Clears all highlighting from the main SmartPlant Review application window.

HighlightObject ( int objectId ) : void

Highlights a specified object in the main SmartPlant Review application Window

HighlightObject ( int objectId, Color color, int width = 2 ) : void
ObjectDataSearch ( string criteria ) : List

Searches through the active session for objects matching the supplied search criteria.

Open ( string fileName ) : void

Attempts to open the specified session in the fileName. Any active session will first be closed.

RefreshData ( ) : void

Refreshes the session data as if selected from the application menu.

SetCenterPoint ( SprPoint3D centerPoint ) : void
SetCenterPoint ( double east, double north, double elevation ) : void
SetEyePoint ( SprPoint3D eyePoint ) : void
SetEyePoint ( double east, double north, double elevation ) : void
SprApplication ( ) : System

Creates a new SprApplication class. Will automatically connect to a single SmartPlant Review process if available.

TakeSnapshot ( string imageName, string outputDir, SprSnapShot snapShot = null ) : Image

Captures the active SmartPlant Reviews session main view and writes it an image of the given filename and format.

Защищенные методы

Метод Описание
Dispose ( bool disposing ) : void

Приватные методы

Метод Описание
CheckIsBusy ( ) : bool
GetDesignFiles ( ) : List
GetMdbDatabase ( ) : DataSet
GetMdbPath ( ) : string
GetNextAnnotation ( ) : int
GetNextTag ( ) : int
GetProcessId ( ) : IntPtr
GetSessionName ( ) : string
GetVersion ( ) : string
RefreshRow ( string tableName, object id ) : DataRow
RefreshTable ( string tableName ) : DataTable
SetNextAnnotation ( int annoId ) : void
SetNextTag ( int tagId ) : void
UpdateRow ( string tableName, object id ) : void
UpdateTable ( string tableName ) : void

Описание методов

Activate() публичный Метод

Brings the SmartPlant Review application to the foreground.
public Activate ( ) : void
Результат void

Annotations_Add() публичный Метод

Adds a list of annotations into the Mdb annotation table.
public Annotations_Add ( List annotations ) : void
annotations List List of SprAnnotation to be added to the annotation table.
Результат void

Annotations_Add() публичный Метод

Adds an annotation directly into the Mdb annotation table.
public Annotations_Add ( SprAnnotation anno ) : void
anno SprAnnotation SprAnnotation containing the annotation information.
Результат void

Annotations_Delete() публичный Метод

Prompts a user to delete an annotation in the SmartPlant Review main view.
public Annotations_Delete ( string type ) : void
type string The string type of the annotation to delete.
Результат void

Annotations_DeleteAll() публичный Метод

Deletes all the annotations from the active SmartPlant Review session.
public Annotations_DeleteAll ( ) : void
Результат void

Annotations_DeleteType() публичный Метод

Deletes all the annotations of a specified type from the active SmartPlant Review session.
public Annotations_DeleteType ( string type ) : void
type string The string type of the annotations to delete.
Результат void

Annotations_EditLeader() публичный Метод

public Annotations_EditLeader ( SprAnnotation &annotation ) : void
annotation SprAnnotation
Результат void

Annotations_EditLeader() публичный Метод

public Annotations_EditLeader ( int annoNo ) : void
annoNo int
Результат void

Annotations_Get() публичный Метод

Retrieves the desired annotation from the Mdb text_annotations table.
public Annotations_Get ( int annoId ) : SprAnnotation
annoId int Unique Id of the annotation to retrieve.
Результат SprAnnotation

Annotations_Place() публичный Метод

Toggles annotation display in the SmartPlant Review application main window. Creates a new data field in the Mdb text_annotations table. Returns true if the field already exists. Prompts a user to place a new annotation in the SmartPlant Review main view.
public Annotations_Place ( SprAnnotation &anno ) : void
anno SprAnnotation Reference SprAnnotation containing the annotation information.
Результат void

Annotations_Select() публичный Метод

Prompts a user to select an annotation in the SmartPlant Review main view.
public Annotations_Select ( string type ) : SprAnnotation
type string The string type of the annotation to be selected.
Результат SprAnnotation

Annotations_Update() публичный Метод

Updates annotation data directly in the Mdb text_annotations table.
public Annotations_Update ( SprAnnotation anno ) : bool
anno SprAnnotation SprAnnotation containing the annotation information.
Результат bool

Annotations_Update() публичный Метод

Updates annotation information directly in the Mdb text_annotations table, queueable from the threadpool.
public Annotations_Update ( object stateInfo ) : void
stateInfo object SprAnnotation passed as an object per WaitCallback requirements.
Результат void

Connect() публичный Метод

Connects to a running instance of SmartPlant Review.
public Connect ( ) : bool
Результат bool

Dispose() публичный Метод

Releases the connection to the SprApplication.
public Dispose ( ) : void
Результат void

Dispose() защищенный Метод

protected Dispose ( bool disposing ) : void
disposing bool
Результат void

Exit() публичный Метод

Exits the SmartPlant Review application.
public Exit ( ) : void
Результат void

Export() публичный Метод

Exports the current session to a VUE file format. Compatible only with SPR versions 9 and above.
public Export ( string vueName ) : void
vueName string The full path of the vue file to be exported.
Результат void

ExportPdf() публичный Метод

Compatible only with SPR versions 9 and above.
public ExportPdf ( int quality, string path ) : void
quality int
path string
Результат void

GetCenterPoint() публичный Метод

public GetCenterPoint ( ) : SprPoint3D
Результат SprPoint3D

GetObjectData() публичный Метод

Uses an Object Id to retrieve detailed object information.
public GetObjectData ( int objectId ) : SprObject
objectId int The ObjectId that is looked up inside SmartPlant Review.
Результат SprObject

GetObjectData() публичный Метод

Prompts a user to select an object inside SmartPlant Review. Retrieves object information from the selected object.
public GetObjectData ( string prompt ) : SprObject
prompt string The prompt string to be displayed in the application text window.
Результат SprObject

GetObjectData() публичный Метод

Prompts a user to select an object inside SmartPlant Review. Retrieves object information from the selected object.
public GetObjectData ( string prompt, bool singleObjects ) : SprObject
prompt string The prompt string to be displayed in the application text window.
singleObjects bool Indicates if SmartPlant Review locates grouped objects individually.
Результат SprObject

GetObjectId() публичный Метод

Prompts a user to select an object inside SmartPlant Review. Retrieves the Object Id of the selected object.
public GetObjectId ( string prompt ) : int
prompt string The prompt string to be displayed in the application text window.
Результат int

GetObjectId() публичный Метод

Prompts a user to select an object inside SmartPlant Review. Retrieves the Object Id of the selected object.
public GetObjectId ( string prompt, SprPoint3D &refPoint ) : int
prompt string The prompt string to be displayed in the application text window.
refPoint SprPoint3D The returned reference point representing the selected point.
Результат int

GetPoint() публичный Метод

Prompts a user to select a point inside SmartPlant Review. Retrieves the physical point selected on screen.
public GetPoint ( string prompt ) : SprPoint3D
prompt string The prompt string to be displayed in the application text window.
Результат SprPoint3D

GetPoint() публичный Метод

Prompts a user to select a point inside SmartPlant Review. Retrieves the physical point selected on screen.
public GetPoint ( string prompt, SprPoint3D targetPoint ) : SprPoint3D
prompt string The prompt string to be displayed in the application text window.
targetPoint SprPoint3D The point used to calculate depth.
Результат SprPoint3D

GlobalOptionsGet() публичный Метод

Gets the value of a specified global option in SmartPlant Review.
public GlobalOptionsGet ( int option ) : double
option int The integer value of the option to retrieve.
Результат double

GlobalOptionsSet() публичный Метод

Sets the value of a specified global option in SmartPlant Review.
public GlobalOptionsSet ( int option, int value ) : void
option int The integer of the global option to set.
value int The integer value to set the global option to.
Результат void

HighlightClear() публичный Метод

Clears all highlighting from the main SmartPlant Review application window.
public HighlightClear ( ) : void
Результат void

HighlightObject() публичный Метод

Highlights a specified object in the main SmartPlant Review application Window
public HighlightObject ( int objectId ) : void
objectId int Object Id of the of the entity to be highlighted.
Результат void

HighlightObject() публичный Метод

public HighlightObject ( int objectId, Color color, int width = 2 ) : void
objectId int
color Color
width int
Результат void

ObjectDataSearch() публичный Метод

Searches through the active session for objects matching the supplied search criteria.
public ObjectDataSearch ( string criteria ) : List
criteria string The search criteria used to find matching objects.
Результат List

Open() публичный Метод

Attempts to open the specified session in the fileName. Any active session will first be closed.
public Open ( string fileName ) : void
fileName string The full path of the session to load.
Результат void

RefreshData() публичный Метод

Refreshes the session data as if selected from the application menu.
public RefreshData ( ) : void
Результат void

SetCenterPoint() публичный Метод

public SetCenterPoint ( SprPoint3D centerPoint ) : void
centerPoint SprPoint3D
Результат void

SetCenterPoint() публичный Метод

public SetCenterPoint ( double east, double north, double elevation ) : void
east double
north double
elevation double
Результат void

SetEyePoint() публичный Метод

public SetEyePoint ( SprPoint3D eyePoint ) : void
eyePoint SprPoint3D
Результат void

SetEyePoint() публичный Метод

public SetEyePoint ( double east, double north, double elevation ) : void
east double
north double
elevation double
Результат void

SprApplication() публичный Метод

Creates a new SprApplication class. Will automatically connect to a single SmartPlant Review process if available.
public SprApplication ( ) : System
Результат System

TakeSnapshot() публичный Метод

Captures the active SmartPlant Reviews session main view and writes it an image of the given filename and format.
public TakeSnapshot ( string imageName, string outputDir, SprSnapShot snapShot = null ) : Image
imageName string Name of the final output image.
outputDir string Directory to save the snapshot to.
snapShot SprSnapShot SprSnapshot containing the snapshot settings.
Результат Image