Continue to Site

Welcome to MCAD Central

Join our MCAD Central community forums, the largest resource for MCAD (Mechanical Computer-Aided Design) professionals, including files, forums, jobs, articles, calendar, and more.

CreateNoteParamValue

Arno

New member
Hi everybody (hope many read this!)

has anyone ever used the 'CreateNoteParamValue' method?

I want to create a parameter in a note (preferably with
J-Link), but it just runs over the code without doing
anything..

i have tried 2 ways:

ParamValue
parva=pfcModelItem.CreateNoteParamValue(NoteId);
parva.SetStringValue("string value")

=> above example seems odd to me, because i don't need to
enter the name of the parameter anywhere..

So I also tried normal way;

ParameterOwner paro=(ParameterOwner)item; 'item = note
Paramvalue
parva=pfcModelItem.CreateStringParamValue("string value")
paro.CreateParam("para name",parva);

=> this gives toolkitbadinput error


all thoughts are welcome.
 
I think you are doing it in wrong way. Given API is to link existing model parameter with the note text not to create new parameter in note. Here is description from API help to give you more insights -

A note in a drawing, or in a symbol definition, can be parameterized. This means that it contains the name of a parameter from a Pro/ENGINEER model, preceded by a '&'. The '&' and the parameter name are replaced by the value of the parameter when the note is displayed, or when the symbol is instantiated.


HTH
 
That makes sense

allthough i would rather work with the full version Pro/TOOLKIT. Seems like JLink and VB API are more limited then i guessed. but the toolkit has a painfull pricetag :(
 
"toolkitbadinput error"....you are very close to what you want. Just check if the name you are providing is acceptable or that data you are providing is acceptable.
 

Sponsor

Articles From 3DCAD World

Back
Top