Message 1 of 8

Not applicable
02-14-2019
12:18 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Is there an example somewhere for C++ in adding user parameters? I have trouble adding them to the active file. I can read them, count them and so on, but when I make changes or add another one nothing changes in the parameters tab.
so the code is something similar to this:
Ptr<Product> product2 = app->activeProduct(); if (!product) return false; Ptr<Design> design2 = product; if (!design) return false; Ptr<UserParameters> userParameters = design2->userParameters(); if(!userParameters) return false; Ptr<ValueInput> valueInput = adsk::core::ValueInput::createByString(fileParam->expression()); userParameters->add(fileParam->name(), valueInput, fileParam->unit(), fileParam->comment());
I can though edit parameters in other files with pretty much the same code.
Solved! Go to Solution.