C# 클래스 SharpPlant.SharpPlantReview.SprApplication

Provides methods and properties for interacting with SmartPlant Review.
상속: IDisposable
파일 보기 프로젝트 열기: phusband/SharpPlant 1 사용 예제들

공개 메소드들

메소드 설명
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