NLF instructions - SmartPlant Foundation - IM Update 48 - Help - Hexagon

SmartPlant Foundation Help

Language
English
Product
SmartPlant Foundation
Search by Category
Help
SmartPlant Foundation / SDx Version
10
SmartPlant Markup Plus Version
10.0 (2019)
Smart Review Version
2020 (15.0)

NLF also supports a subset of SmartPlant Foundation instructions. These can be triggered by defining the object that exists in the database followed by the keyword Action and then one of the defined actions as listed below.

The following is an example of an NLF file with an instruction.

.DEVTag

..Name|CW506

..Action|Terminate

Format

Description

Example

..Action|Delete

If set, generates a DeleteInstruction for the named object and sets the argument DeleteTransition to Delete. The object is deleted, along with its relationships and any associated object that is defined using the delete_12 and delete_21 flags on the relationship definition.

..Action|Delete

..Action|ProgressRegister|TimeString|PlannedDate

If set, generates a SPFPrgRegisterInstruction and submits arg1 as the SPFPrgInstructionTimestring and arg2 as SPFPrgInstructionPlannedDate. The date format is dd/mm/yyyy. The instruction registers the name object and associates it with a workpack.

..Action|ProgressRegister|ComplexDrg|22/06/2007

..Action|Revise|RevScheme|MajorRevision|MinorRevision|CopyFilesOnRevise|SignOffAfterRevise

..SPFReviseInstFilesToAttach|FilePaths|FileClassdef

This action works on Document objects only. If set, generates a SPFReviseInstruction and submits arg1 as the SPFReviseInstRevScheme, arg2 as SPFReviseInstMajorRevision, and arg3 as SPFReviseInstMinorRevision. The instruction will validate that the document can be revised before performing the revise function. If the CopyFilesOnRevise argument (arg4) is omitted or set to any value but False, files are carried to the next revision. If the SignOffAfterRevise argument (arg5) is set to True, then the new revision created after revise will be signed off.

If the node SPFReviseInstFilesToAttach is specified along with the action “Revise”, then the files mentioned in the “FilePaths” argument will be attached to the new revision. The file objects created will be of type mentioned in the “FileClassdef" argument.

It assumes that the files are already uploaded to a SessionID named folder in the temp directory of the file or database server.

..Action|Revise|Rev01A|01|A|False|True

..SPFReviseInstFilesToAttach|File1.txt;File2.txt|SPFDesignFile

..Action|SignOff|

This action works on Document objects only. If set, generates a SPFSignOffInstruction and submits arg1 as the SignOffInstructionComment and arg2 as SignOffInstructionAllowWorkingRefs. The instruction validates that the document can be signed off before performing the signoff function.

..Action|SignOff|Document checked by client

..Action|Terminate

If set, generates a DeleteInstruction for the named object and sets the argument DeleteTransition to Terminated. The object is terminated, along with its relationships and any associated object that is defined using the delete_12 and delete_21 flags on the relationship definition.

..ActionTerminate

..Action|Reclassify|New class definition

If set, generates a SPFReclassifyInstruction for the named object. The new class definition supplied as arg1 is checked to see if it belongs in the same shared object group as the existing class definition of the object. If so, reclassification takes place.

..Action|Reclassify|SPFCentrifugalPump

..Action|Claim

If set, generates a SPFClaimInstruction for the named object. As a result, the object is claimed, along with its relationships and any associated object that is defined using the claim_12 and claim_21 flags on the relationship definition.

..Action|Claim

..Action|AttachWorkflow|WorkflowUID|RestrictMultipleWorkflowAttachment

This action generates a SPFAttachWorkflowInstruction for the named object and sets the Workflow UID to the value specified by arg1. The named workflow is attached to the object if it is valid to do so. The last parameter is a Boolean that indicates whether multiple workflows can be attached.

Use multiple instructions to attach multiple workflows to the document.

..Action|attachWorkflow|TagWorkflow001|True

..Action|Merge|Comments

This action generates a SPFMergeInstruction for the named object and sets the SPFMergeComment to the value specified by arg1.

..Action|Merge|Merge set CX4514

..Action|CreateNewVersionIfExists

This action is specific for files and automatically creates the next version of the document if there is one already.

..Action|AttachFile|FilePaths|FileClassdef|RemoveLocalFile|FileExistsAction|SignOffAfterAttach

This action is specific to all objects whose class definitions realize the interface ISPFFileComposition. If set, generates a SPFAttachFileInstruction and submits arg1 as SPFAFILocalFilePath, arg2 as SPFAFIFileClassDef, arg3 as SPFAFIRemoveLocalFileInd, and arg4 as SPFAFIActionIfDuplicateFileExists. The instruction validates that the files can be attached to the specified object. It creates file objects of the type specified in SPFAFIFileClassDef and retrieves physical files from SPFAFILocalFilePath for attachment. If a file with the same name already exists on the specified object, then it proceeds with the action specified in SPFAFIActionIfDuplicateFileExists.


Arg(1):FilePaths – Paths of files to be attached.

Arg(2):FileClassdef – Class definition of the file objects to be created.

Arg(3):Remove Local file – If true, it removes local files. It is an optional parameter and the default value is false.

Arg(4):Action – If the file already exists on the specified object, based on the value, the action is performed. Possible values are:

CREATENEWVERSION: Creates a new version, attaches the new files, and copies the files from the previous version to this file.

REPLACE: Replaces the attached file with the new file.

ERROR: Throws an error saying the file already exists.

Arg(4) is an optional parameter and its default value is ERROR.

If the argument “SignOffAfterAttach” is set to True, then it signs off the object (if it is a document) after attaching the files.

.SPFDesignDocVersion

..Name|Doc_PlantA

..Action|AttachFile|C:\UploadFile1.txt, C:\UploadFile2.txt|SPFDesignFile|False|Replace|True