Search K
Appearance
Appearance
Minute Controller allows a post-process PowerShell script to execute upon each file created in the set. This can be particularly useful for returning custom tailored properties to the created file that can only be created through the means of a custom script.
With the PowerShell script, it's possible to:
Returned properties of the wsObject include;
NewFileName
: The file name applied to the generated drawing based off of the schema.properties
: The properties assigned to the last generated drawing that were applied during the file set configuration through the Drawing Register application.vFolder
: The properties returned from the target folder where the file set has been created.ExistingFile
: Boolean indicating if the file was existing prior.ToRegister
: Boolean indicating if the Register Drawing check-box was enabledSelectedSchema
: The active schema used for the drawing generation.Sample PowerShell Script for use with Numbering.
# $wsObject - Variable contains the file object last generated by the Drawing Register.
try{
$fileNameWithoutExtension = [System.IO.Path]::GetFileNameWithoutExtension($wsObject.NewFileName)
$wsObject.properties["Drawing No."] = $fileNameWithoutExtension
}
catch{
}