How to change values in the attribute man

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 18/07/2008 at 06:10, xxxxxxxx wrote:

User Information:
Cinema 4D Version:   10 
Platform:   Windows  ;   
Language(s) :     C++  ;

---------
Hi.
Can somebody please tell me, how I can change the values in the attribut manager programmatically?

This doesn't work:

BaseContainer *data = node->GetDocument()->GetDataInstance();

data->SetReal(ASTANSATZ,0);

node->Message(MSG_UPDATE);

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 18/07/2008 at 06:14, xxxxxxxx wrote:

Well, obviously. You are getting the BaseContainer of the document not the node! Try:

BaseContainer* data = node->GetDataInstance();

instead. 🙂

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 18/07/2008 at 06:38, xxxxxxxx wrote:

Hm. There is no function GetDataInstance() in node. By the way this should happen in the Message()-function.

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 18/07/2008 at 07:30, xxxxxxxx wrote:

Sorry, you have to up-cast the node, for instance:

BaseContainer* bc = ((BaseObject* )node)->GetDataInstance();

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 18/07/2008 at 07:52, xxxxxxxx wrote:

Works fine. Thank you!