Interface IPrograms
Gives access to programs.
Namespace: TopSolid.Cam.NC.Kernel.Automating
Assembly: TopSolid.Cam.NC.Kernel.Automating.dll
Syntax
public interface IPrograms
Methods
GetComment(ElementId)
Get program comment.
Declaration
SmartText GetComment(ElementId inProgramId)
Parameters
| Type | Name | Description |
|---|---|---|
| ElementId | inProgramId | Identifier of the NC program to modify. |
Returns
| Type | Description |
|---|---|
| SmartText | Program comment. |
GetEnding(ElementId)
Get program ending.
Declaration
SmartText GetEnding(ElementId inProgramId)
Parameters
| Type | Name | Description |
|---|---|---|
| ElementId | inProgramId | Identifier of the NC program to modify. |
Returns
| Type | Description |
|---|---|
| SmartText | Program ending. |
GetFileName(ElementId)
Get program file name.
Declaration
string GetFileName(ElementId inProgramId)
Parameters
| Type | Name | Description |
|---|---|---|
| ElementId | inProgramId | Identifier of the NC program to modify. |
Returns
| Type | Description |
|---|---|
| System.String | Program file name. |
GetHeader(ElementId)
Get program header.
Declaration
SmartText GetHeader(ElementId inProgramId)
Parameters
| Type | Name | Description |
|---|---|---|
| ElementId | inProgramId | Identifier of the NC program to modify. |
Returns
| Type | Description |
|---|---|
| SmartText | Program header. |
GetName(ElementId)
Get program name.
Declaration
string GetName(ElementId inProgramId)
Parameters
| Type | Name | Description |
|---|---|---|
| ElementId | inProgramId | Identifier of the NC program to modify. |
Returns
| Type | Description |
|---|---|
| System.String | Program name. |
GetProgram(ElementExId)
Gets the NC program from the given operation.
Declaration
ElementId GetProgram(ElementExId inOperationId)
Parameters
| Type | Name | Description |
|---|---|---|
| ElementExId | inOperationId | Identifier of the operation to analyze. |
Returns
| Type | Description |
|---|---|
| ElementId | Program entity. |
GetPrograms(DocumentId)
Get the list of NC programs in the document.
Declaration
List<ElementId> GetPrograms(DocumentId inDocumentId)
Parameters
| Type | Name | Description |
|---|---|---|
| DocumentId | inDocumentId | Identifier of the document to analyze. |
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.List<ElementId> | List of all NC programs. |
IsProgram(ElementId)
Tells whether an element is a program.
Declaration
bool IsProgram(ElementId inElementId)
Parameters
| Type | Name | Description |
|---|---|---|
| ElementId | inElementId | Identifier of the element to analyze. |
Returns
| Type | Description |
|---|---|
| System.Boolean | True if the element is a program. |
SetComment(ElementId, SmartText)
Set program comment.
Declaration
void SetComment(ElementId inProgramId, SmartText inComment)
Parameters
| Type | Name | Description |
|---|---|---|
| ElementId | inProgramId | Identifier of the NC program to modify. |
| SmartText | inComment | Program comment. |
Remarks
StartModification(String, Boolean) and EnsureIsDirty(ref DocumentId) must be called before calling this method.
SetEnding(ElementId, SmartText)
Set program ending.
Declaration
void SetEnding(ElementId inProgramId, SmartText inEnding)
Parameters
| Type | Name | Description |
|---|---|---|
| ElementId | inProgramId | Identifier of the NC program to modify. |
| SmartText | inEnding | Program ending. |
Remarks
StartModification(String, Boolean) and EnsureIsDirty(ref DocumentId) must be called before calling this method.
SetFileName(ElementId, SmartText)
Set program file name.
Declaration
void SetFileName(ElementId inProgramId, SmartText inFileName)
Parameters
| Type | Name | Description |
|---|---|---|
| ElementId | inProgramId | Identifier of the NC program to modify. |
| SmartText | inFileName | Program file name. |
Remarks
StartModification(String, Boolean) and EnsureIsDirty(ref DocumentId) must be called before calling this method.
SetHeader(ElementId, SmartText)
Set program header.
Declaration
void SetHeader(ElementId inProgramId, SmartText inHeader)
Parameters
| Type | Name | Description |
|---|---|---|
| ElementId | inProgramId | Identifier of the NC program to modify. |
| SmartText | inHeader | Program header. |
Remarks
StartModification(String, Boolean) and EnsureIsDirty(ref DocumentId) must be called before calling this method.
SetName(ElementId, String, out String)
Set program name.
Declaration
void SetName(ElementId inProgramId, string inName, out string outError)
Parameters
| Type | Name | Description |
|---|---|---|
| ElementId | inProgramId | Identifier of the NC program to modify. |
| System.String | inName | Program name. |
| System.String | outError | Error message, or null if name is allowed. |
Remarks
StartModification(String, Boolean) and EnsureIsDirty(ref DocumentId) must be called before calling this method.