cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X

Set value for Real Number parameter? CREO 2.0 VB

bdijkstra
4-Participant

Set value for Real Number parameter? CREO 2.0 VB

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.
1 ACCEPTED SOLUTION

Accepted Solutions

try CMpfcModelItem.CreateDoubleParamValue()

View solution in original post

1 REPLY 1

try CMpfcModelItem.CreateDoubleParamValue()

Top Tags