Interface IApplication
Gives access to the application.
Namespace: TopSolid.Pdm.Explorer.Automating
Assembly: cs.temp.dll.dll
Syntax
[AvailableSinceVersion(7, 11, 300, 80)]
public interface IApplication
  Remarks
This interface is available since v7.10.
Properties
ProcessId
Gets the identifier of application process.
Declaration
[AvailableSinceVersion(7, 11, 300, 80)]
int ProcessId { get; }
  Property Value
| Type | Description | 
|---|---|
| Int32 | 
Version
Gets the version of the application.
Declaration
[AvailableSinceVersion(7, 11, 300, 80)]
int Version { get; }
  Property Value
| Type | Description | 
|---|---|
| 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.
This method returns 0 if the application has just been started and is not ready yet.
This property is available since v7.10.
Methods
EndModification(Boolean, Boolean)
Ends performing modifications.
Declaration
[AvailableSinceVersion(7, 11, 300, 80)]
void EndModification(bool inIsOk, bool inUpdates)
  Parameters
| Type | Name | Description | 
|---|---|---|
| Boolean | inIsOk | Whether the modifications have been successful.  | 
      
| Boolean | inUpdates | Whether to perform an update.  | 
      
Remarks
This method must be called after the StartModification(String, Boolean) method has been called and has returned true.
If the modifications have not been successful, they are undone when possible.
This method is available since v7.6.
Examples
 if (TopSolidHost.Application.StartModification("My Modification", false)) 
    {
        try
        {
            // Perform my modification.
            TopSolidHost.Application.EndModification(true, true);
        }
        catch
        {
            TopSolidHost.Application.EndModification(false, false);
        }
    }
  
  IsLicenseValid(Int32)
Tells whether a valid TopSolid license is available.
Declaration
[AvailableSinceVersion(7, 11, 300, 80)]
bool IsLicenseValid(int inModuleId)
  Parameters
| Type | Name | Description | 
|---|---|---|
| Int32 | inModuleId | TopSolid module identifier.  | 
      
Returns
| Type | Description | 
|---|---|
| Boolean | 
Remarks
This method is available since v7.10.
Quit()
Terminates the applicaton.
Declaration
[AvailableSinceVersion(7, 11, 300, 80)]
void Quit()
  Remarks
This method is available since v7.10.
StartModification(String, Boolean)
Starts performing modifications.
Declaration
[AvailableSinceVersion(7, 11, 300, 80)]
bool StartModification(string inUndoSequenceName, bool inIsUndoSequenceGhost)
  Parameters
| Type | Name | Description | 
|---|---|---|
| String | inUndoSequenceName | Name of the undo sequence.  | 
      
| Boolean | inIsUndoSequenceGhost | Whether the undo sequence is hidden from the user.  | 
      
Returns
| Type | Description | 
|---|---|
| Boolean | Modifications can be performed.  | 
      
Remarks
This method must be called before any modification is attempted.
This method is available since v7.6.
Examples
 if (TopSolidHost.Application.StartModification("My Modification", false)) 
    {
        try
        {
            // Perform my modification.
            TopSolidHost.Application.EndModification(true, true);
        }
        catch
        {
            TopSolidHost.Application.EndModification(false, false);
        }
    }