Class TopSolidPdmExplorerHost
Represents TopSolid'Pdm Explorer host providing WCF services for automating.
Inheritance
Inherited Members
Namespace: TopSolid.Pdm.Explorer.Automating
Assembly: cs.temp.dll.dll
Syntax
[AvailableSinceVersion(7, 11, 300, 80)]
public static class TopSolidPdmExplorerHost
Remarks
This class is available since v7.10.
Properties
Application
Gets access to the application, or null if not available.
Declaration
public static IApplication Application { get; }
Property Value
Type | Description |
---|---|
IApplication |
ClientAddress
Gets the client IP address used for receiving events when using TCP, or null for not managing events.
Declaration
public static string ClientAddress { get; }
Property Value
Type | Description |
---|---|
System.String |
ClientName
Gets the client name, or null if anonymous.
Declaration
public static string ClientName { get; }
Property Value
Type | Description |
---|---|
System.String |
ClientPort
Gets the client port used for receiving events when using TCP, or 0 for not managing events.
Declaration
public static int ClientPort { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
ClientVersion
Gets the version of TopSolid used to build this application.
Declaration
public static int ClientVersion { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Remarks
The value returned is defined by: Major * 100000000 + Minor * 1000000 + Build * 1000 + Revision
.
For example, v7.5.200.100 is returned as: 705200100
.
HostAddress
Gets the host IP address, or null if not using TCP.
Declaration
public static string HostAddress { get; }
Property Value
Type | Description |
---|---|
System.String |
HostInstance
Gets the TopSolid'Pdm Client host instance.
Declaration
public static TopSolidPdmExplorerHostInstance HostInstance { get; }
Property Value
Type | Description |
---|---|
TopSolidPdmExplorerHostInstance |
HostPort
Gets the host port, or 0 if not using TCP.
Declaration
public static int HostPort { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
IsConnected
Tells whether TopSolid is connected.
Declaration
public static bool IsConnected { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Pdm
Gets access to the PDM, or null if not available.
Declaration
public static IPdm Pdm { get; }
Property Value
Type | Description |
---|---|
IPdm |
PdmAdmin
Gets access to the PDM administration, or null if not available.
Declaration
public static IPdmAdmin PdmAdmin { get; }
Property Value
Type | Description |
---|---|
IPdmAdmin |
PdmSecurity
Gets access to the PDM security, or null if not available.
Declaration
public static IPdmSecurity PdmSecurity { get; }
Property Value
Type | Description |
---|---|
IPdmSecurity |
PdmWorkflow
Gets access to the PDM administration, or null if not available.
Declaration
public static IPdmWorkflow PdmWorkflow { get; }
Property Value
Type | Description |
---|---|
IPdmWorkflow |
PipeName
Gets or sets the name used to make named pipe, or null for default.
Declaration
public static string PipeName { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Remarks
This property can be changed before connecting to a TopSolid host on the same machine using named pipes if the default name is not convenient (in particular when several TopSolid processes are running at the same time), it is not needed to change it otherwize.
This property cannot be set once connected to TopSolid, i.e. when IsConnected is true
.
Version
Gets the version of TopSolid host, or 0 if not connected.
Declaration
public static int Version { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Remarks
The value returned is defined by: Major * 100000000 + Minor * 1000000 + Build * 1000 + Revision
.
For example, v7.5.200.100 is returned as: 705200100
.
Methods
Connect()
Connects to TopSolid application.
Declaration
public static bool Connect()
Returns
Type | Description |
---|---|
System.Boolean | TopSolid has been automatically started. |
Remarks
TopSolid is automatically started if it is not already running.
When starting TopSolid automatically, if several versions are installed, the most recent version is started.
When starting TopSolid automatically, if both 64-bit and 32-bit versions are installed, the 64-bit version is started.
This methods waits up to 10 minutes for TopSolid to be ready before failing to connect.
Connect(Boolean, Int32)
Connects to TopSolid application.
Declaration
public static bool Connect(bool inStarts, int inTimeOut)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | inStarts | Automatically starts TopSolid if it is not already running. |
System.Int32 | inTimeOut | Number of seconds to wait for TopSolid to be ready before failing to connect. |
Returns
Type | Description |
---|---|
System.Boolean | TopSolid has been automatically started. |
Remarks
When starting TopSolid automatically, if several versions are installed, the most recent version is started.
When starting TopSolid automatically, if both 64-bit and 32-bit versions are installed, the 64-bit version is started.
Connect(Boolean, Int32, String)
Connects to TopSolid application.
Declaration
public static bool Connect(bool inStarts, int inTimeOut, string inClientName)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | inStarts | Automatically starts TopSolid if it is not already running. |
System.Int32 | inTimeOut | Number of seconds to wait for TopSolid to be ready before failing to connect. |
System.String | inClientName | Name identifying your application, ex: "MyApplication". |
Returns
Type | Description |
---|---|
System.Boolean | TopSolid has been automatically started. |
Remarks
When starting TopSolid automatically, if several versions are installed, the most recent version is started.
When starting TopSolid automatically, if both 64-bit and 32-bit versions are installed, the 64-bit version is started.
The inClientName
string must uniquely identify your application, as it is used to make a Windows pipe name that must be unique
when managing events.
Connect(String)
Connects to TopSolid application.
Declaration
public static bool Connect(string inClientName)
Parameters
Type | Name | Description |
---|---|---|
System.String | inClientName | Name identifying your application, ex: "MyApplication". |
Returns
Type | Description |
---|---|
System.Boolean | TopSolid has been automatically started. |
Remarks
TopSolid is automatically started if it is not already running.
When starting TopSolid automatically, if several versions are installed, the most recent version is started.
When starting TopSolid automatically, if both 64-bit and 32-bit versions are installed, the 64-bit version is started.
This methods waits up to 10 minutes for TopSolid to be ready before failing to connect.
DefineConnection(String, Int32, String, Int32)
Defines the connection between this client application and TopSolid host for remote access.
Declaration
public static void DefineConnection(string inHostAddress, int inHostPort, string inClientAddress, int inClientPort)
Parameters
Type | Name | Description |
---|---|---|
System.String | inHostAddress | Host IP address (or "localhost" for local machine) if using TCP, or null otherwize (default). |
System.Int32 | inHostPort | Host port used if using TCP, or 0 otherwize (default). |
System.String | inClientAddress | Client IP address (or "localhost" for local machine) if using TCP and managing events, or null otherwize (default). |
System.Int32 | inClientPort | Client port used if using TCP and managing events, or 0 otherwize (default). |
Remarks
This method must be called before connecting to a remote TopSolid host on another machine to use TCP instead of named pipes, it is not needed to call it otherwize.
When performing remote access and using events, inClientAddress
and inClientPort
must be set to allow TopSolid to connect
to this client application, otherwize they must be set to null
and 0
.
This method cannot be called once connected to TopSolid, i.e. when IsConnected is true
.
Disconnect()
Disconnects from TopSolid application.
Declaration
public static void Disconnect()
ParseVersion(String)
Parses a string version (i.e. "7.8.200.0" to get the corresponding integer version (i.e. 708200000).
Declaration
public static int ParseVersion(string inVersion)
Parameters
Type | Name | Description |
---|---|---|
System.String | inVersion | String version. |
Returns
Type | Description |
---|---|
System.Int32 | Integer version. |
Events
Exited
This event is raised when TopSolid has exited.
Declaration
public static event EventHandler Exited
Event Type
Type | Description |
---|---|
System.EventHandler |