Can formulas for dynamic components be cleared into formula results?

Hi guys, I’m using .set_attribute(dict,‘test’, ‘100’) as well as set_attribute(dict,‘_lenx_formula’, ‘100’) to assign the value of test to lenx, but lenx now becomes a formula, which results in a scaling operation on the component Invalid, is it possible to have another operation that transforms him into the result of a formula instead of a formula?


Sorry, I’m a little confused.

In the end, I gave up on this idea and had to use scaling to set it on the component, and then I had the next problem, the newly created component has no dynamic component related properties, so how do I get the value of lenx at this point?

He means …

… set the value 100 to the lenx attribute proper, … not the _lenx_formula attribute.

1 Like

hey Dan,I saw the Eneroth De-DC-ify plugin developed by eneroth3 in the extension store, it solves my need perfectly: changing formulas inside dynamic components to the current result, but it’s encrypted and I can’t see how it’s done, maybe you can tell me roughly how?
Before clearing: LenX: =200+1
After clearing: LenX: 201

I am not interested in deveining how her extension works.

There are previous topics on hacking the DC extension in the DC category.

hey Dan,I’m no longer concerned about how to clear the lenx formula, but I’ve run into a new problem where I’m applying transformations to a DC component, and I’m finding that it doesn’t adapt itself to size changes based on its own formula, and if I then use the

$dc_observers.get_latest_class.redraw (instance)

Found that the DC reverts back to it’s initial defined size, do you know what the reason is and if there is a way to fix it? Grateful!

(1) Do not put a space between a method call and it’s parameter list as in:

This can confuse the Ruby interpreter as it looks like parenthesis around an expression rather than a method call parameter list. No doubt confusing to reader of the code.
This can also result in Ruby spitting out warnings depending upon the settings of $VERBOSE.

(2) Please do not “piggyback” problems onto the same forum topic. Start a new topic and question in the Dynamic Components subcategory.

Also please, search that category on scaling issues before posting.

If you do need to post, attach a sample model with the DC showing the problem, and be more descriptive about what your expectation is and what happens instead.

1 Like