hexagon logo

TRACEFIELD Scripting Modification

http://www.pcdmisforum.com/showthread.php?27544-Tracefields-and-Scripts&highlight=tracefield+script

Long time lurker and PC-DMIS user, first time posting - and going to get deep here...
Did some searching, and the most similar topic to what I've been looking for is above.

However, what I need is to temporarily - or for one TRACEFIELD item - define the object as a numeric value (Integer preferably...) instead of a String value.

I'm wondering how to pull this off elegantly? I'm somewhat new to scripting but have dabbled scripting in Excel, Access, etc. in the past. Mostly editing and not inventing the wheel, so-to-speak.

I really need to figure out a way to do this or I'll go insane trying - and breaking -stuff. Slight smile

I was thinking of just copying the command and inserting a new assignment for the TRACE_VALUE field, but not sure if that will work. I'm looking for advice here since I don't want to do more harm than good.

Thanks for any help!

Set DmisCommand = DmisCommands.Add(TRACEFIELD, True)
    DmisCommand.Marked = True
  ' Set Name  = Job
    retval = DmisCommand.PutText ("Job", TRACE_NAME, 0)
  ' Set Value  = 0
    retval = DmisCommand.PutText ("0", TRACE_VALUE, 0)
  ' Set Value Limit  = 15
    retval = DmisCommand.PutText ("15", TRACE_VALUE_LIMIT, 0)
  Result = DmisCommand.SetExpression("C2.INPUT", TRACE_VALUE, 0)


I believe I found that TRACE_VALUE is Dim'd as String. I need it to be Integer for one value and String for all others.

Edited to add that it's ok if the value is Long or Double or Integer - as long as it's numeric....
Parents
  • You can enter any value for the trace value. It will be stored in the TMP file as a string.
    TRACE: operator : 1

    The value of the 1 is internal a value of 49 (ascii value of 1).
    Whatever is used to parse the TMP file can then read that string and convert it if they so chose. Call QC Calc to see what they can do.
Reply
  • You can enter any value for the trace value. It will be stored in the TMP file as a string.
    TRACE: operator : 1

    The value of the 1 is internal a value of 49 (ascii value of 1).
    Whatever is used to parse the TMP file can then read that string and convert it if they so chose. Call QC Calc to see what they can do.
Children
No Data