Skip to main content
1-Visitor
June 6, 2016
Solved

Set value for Real Number parameter? CREO 2.0 VB

  • June 6, 2016
  • 1 reply
  • 1772 views

Hi all,

I'm working on a parameter menu, which includes an real number parameter.

How do I set the parameter value of a real number parameter? I can't find it in the VB manual.

My current code:
            Dim session As pfcls.IpfcBaseSession = conn.Session

            Dim mdl As pfcls.IpfcModel

            Dim parameter As pfcls.IpfcParameter

            Dim pvalue As pfcls.IpfcParamValue

            mdl = session.CurrentModel

            parameter = mdl.GetParam("MP_DENSITY")

            pvalue = (New CMpfcModelItem).CreateStringParamValue(CB_DENSITY.Text)

            CType(parameter, pfcls.IpfcBaseParameter).Value = pvalue


I believe the red marked part needs to be changed, but no idea what should be used instead.

Thanks in advance!


This thread is inactive and closed by the PTC Community Management Team. If you would like to provide a reply and re-open this thread, please notify the moderator and reference the thread. You may also use "Start a topic" button to ask a new question. Please be sure to include what version of the PTC product you are using so another community member knowledgeable about your version may be able to assist.
Best answer by GabrielZaha

try CMpfcModelItem.CreateDoubleParamValue()

1 reply

14-Alexandrite
June 6, 2016

try CMpfcModelItem.CreateDoubleParamValue()