hexagon logo

Include PCDMIS Version in report

VPT.SE has CODE for including this in a report header. I followed his work and created this for use in text mode only report style.

Wnat to report the Version of PCDMIS into your "text mode only format" report?
The following CODE will place this COMMENT/REPT into your edit window.
The text 4.1 Release will change to whatever release you are currently running.

COMMENT/REPT,This Was Measured Using PC-DMIS V4.1 Release

Feel free to use it as you like. As usual, no expressed guarantees or liabilities.



Dim PCDDmisApp As Object
Dim PCDDmisPart As Object
Dim PCDDmisCommands As Object
Dim PCDDmisCommand As Object

Sub Part1
Set PCDDmisApp = CreateObject("PCDLRN.Application")
Set PCDDmisPart = PCDDmisApp.ActivePartProgram
Set PCDDmisCommands = PCDDmisPart.Commands
CommandCount = PCDDmisCommands.Count
Set PCDDmisCommand = PCDDmisCommands.Item(CommandCount)
PCDDmisCommands.InsertionPointAfter PCDDmisCommand

Set PCDDmisCommand = PCDDmisCommands.Add(SET_COMMENT, True)
PCDDmisCommand.Marked = True

retval = PCDDmisCommand.PutText ("", ID, 0)
retval = PCDDmisCommand.SetToggleString (4, COMMENT_TYPE, 0)

Dim ThisText, ThatText AsString
ThisText = PCDDmisApp.VersionString
ThatText = "This Was Measured Using PC-DMIS V" & ThisText

retvaltext = PCDDmisCommand.PutText (ThatText, COMMENT_FIELD, 1)

EndSub

Sub Main
Part1
PCDDmisPart.RefreshPart
EndSub