Interface INCFiles
Gives access to NC files, containing NC codes.
Namespace: TopSolid.Cam.NC.Kernel.Automating
Assembly: TopSolid.Cam.NC.Kernel.Automating.dll
Syntax
public interface INCFiles
Methods
ExportNCCodes(ElementId, String)
Save the NC codes of the given file.
Declaration
void ExportNCCodes(ElementId inElementId, string inFileName)
Parameters
| Type | Name | Description |
|---|---|---|
| ElementId | inElementId | Identifier of the NC file entity to analyze. |
| String | inFileName | File to create. |
GetNCCodes(ElementId)
Get the NC Codes of the given NC file entity.
Declaration
List<string> GetNCCodes(ElementId inElementId)
Parameters
| Type | Name | Description |
|---|---|---|
| ElementId | inElementId | The NC file Element Id. |
Returns
| Type | Description |
|---|---|
| List<String> | The NC Codes of this element |
Remarks
The total number of strings can be lower than the real number, depending of the quota of messages Com protocol can handle. To get the real number of strings, use a loop of the other GetNCCodes function.
GetNCCodesPartial(ElementId, Int32, Int32)
Get some NC Code lines of the given NC file entity.
Declaration
List<string> GetNCCodesPartial(ElementId inElementId, int inLinesNumber, int inStartingLine)
Parameters
| Type | Name | Description |
|---|---|---|
| ElementId | inElementId | The NC file Element Id. |
| Int32 | inLinesNumber | |
| Int32 | inStartingLine |
Returns
| Type | Description |
|---|---|
| List<String> | From line inStartingLine to inStartingLine+inNumberOfLines of this element. |
GetNCCodesSize(ElementId)
Get the NC Codes lines number of the given NC file entity.
Declaration
int GetNCCodesSize(ElementId inElementId)
Parameters
| Type | Name | Description |
|---|---|---|
| ElementId | inElementId | The NC file Element Id. |
Returns
| Type | Description |
|---|---|
| Int32 | The total number of NC Codes lines. |
GetNCFiles(DocumentId)
Get the programs contained in the given Iso file.
Declaration
List<ElementId> GetNCFiles(DocumentId inIsoDocumentId)
Parameters
| Type | Name | Description |
|---|---|---|
| DocumentId | inIsoDocumentId | Identifier of the Cam document to scan. |
Returns
| Type | Description |
|---|---|
| List<ElementId> | List of NC programs. |
GetNCFilesDocuments(DocumentId, String)
Get from the Pdm the Iso files created for the given cam file.
Declaration
List<DocumentId> GetNCFilesDocuments(DocumentId inCamDocumentId, string inPPId)
Parameters
| Type | Name | Description |
|---|---|---|
| DocumentId | inCamDocumentId | Identifier of the Cam document to scan. |
| String | inPPId | Name of the PP or empty to find Isos from all PPs. |
Returns
| Type | Description |
|---|---|
| List<DocumentId> | List of Iso documents. |
GetOtherNCFileBufferPartial(PdmMinorRevisionId, Int32, Int32, ref Int32)
Get buffer of NC Code file.
Declaration
char[] GetOtherNCFileBufferPartial(PdmMinorRevisionId inMinorRevisionId, int inBufferSize, int inStartingIndex, ref int outNbCharRead)
Parameters
| Type | Name | Description |
|---|---|---|
| PdmMinorRevisionId | inMinorRevisionId | Identifier of the minor revision. |
| Int32 | inBufferSize | |
| Int32 | inStartingIndex | |
| Int32 | outNbCharRead |
Returns
| Type | Description |
|---|---|
| Char[] | From line inStartingIndex to inStartingIndex+inBufferSize of the file. |
GetOtherNCFileCodes(PdmMinorRevisionId)
Get all NC Code lines of the given other NC file document.
Declaration
List<string> GetOtherNCFileCodes(PdmMinorRevisionId inMinorRevisionId)
Parameters
| Type | Name | Description |
|---|---|---|
| PdmMinorRevisionId | inMinorRevisionId | Identifier of the minor revision. |
Returns
| Type | Description |
|---|---|
| List<String> | The NC codes of the document. |
GetOtherNCFileCodesPartial(PdmMinorRevisionId, Int32, Int32)
Get some NC Code lines of the given of the given other NC file document.
Declaration
List<string> GetOtherNCFileCodesPartial(PdmMinorRevisionId inMinorRevisionId, int inLinesNumber, int inStartingLine)
Parameters
| Type | Name | Description |
|---|---|---|
| PdmMinorRevisionId | inMinorRevisionId | Identifier of the minor revision. |
| Int32 | inLinesNumber | |
| Int32 | inStartingLine |
Returns
| Type | Description |
|---|---|
| List<String> | From line inStartingLine to inStartingLine+inNumberOfLines of the file. |
IsNCFile(ElementId)
Tells whether an element is a NC file.
Declaration
bool IsNCFile(ElementId inElementId)
Parameters
| Type | Name | Description |
|---|---|---|
| ElementId | inElementId | Identifier of the element to analyze. |
Returns
| Type | Description |
|---|---|
| Boolean | True if the element is a NC file. |
IsNCFilesDocument(DocumentId)
Tells whether a document is a NC files document.
Declaration
bool IsNCFilesDocument(DocumentId inDocumentId)
Parameters
| Type | Name | Description |
|---|---|---|
| DocumentId | inDocumentId | Identifier of the document to analyze. |
Returns
| Type | Description |
|---|---|
| Boolean | True if the element is a NC file. |
UpdateNCCodes(ElementId, String)
Updates the NC codes of the given NC file entity in the document.
Declaration
void UpdateNCCodes(ElementId inElementId, string inFileName)
Parameters
| Type | Name | Description |
|---|---|---|
| ElementId | inElementId | Identifier of the NC file entity to update. |
| String | inFileName | Name of a text file containing the full content of the new block file. |
UpdateNCCodesPartial(ElementId, Boolean, List<String>)
Updates the NC codes partialy of the given NC file entity in the document.
Declaration
void UpdateNCCodesPartial(ElementId inElementId, bool inClear, List<string> inNCCodes)
Parameters
| Type | Name | Description |
|---|---|---|
| ElementId | inElementId | Identifier of the NC file entity to update. |
| Boolean | inClear | Indicate if NC file list is cleared before. |
| List<String> | inNCCodes | List of strings to add in NC file. |
UpdateOtherNCFileBufferPartial(PdmMinorRevisionId, Boolean, Char[], Int32)
Update other NC file using buffer.
Declaration
void UpdateOtherNCFileBufferPartial(PdmMinorRevisionId inMinorRevisionId, bool inClear, char[] inBuffer, int inBufferSize)
Parameters
| Type | Name | Description |
|---|---|---|
| PdmMinorRevisionId | inMinorRevisionId | Identifier of the minor revision. |
| Boolean | inClear | |
| Char[] | inBuffer | |
| Int32 | inBufferSize |
UpdateOtherNCFileCodesPartial(PdmMinorRevisionId, Boolean, List<String>)
Update other NC file using list of strings.
Declaration
void UpdateOtherNCFileCodesPartial(PdmMinorRevisionId inMinorRevisionId, bool inClear, List<string> inNCCodes)
Parameters
| Type | Name | Description |
|---|---|---|
| PdmMinorRevisionId | inMinorRevisionId | Identifier of the minor revision. |
| Boolean | inClear | |
| List<String> | inNCCodes |