On 27/02/2018 at 07:39, xxxxxxxx wrote:
this is just a matter of setting the right parameter of the Target tag.
One option to find out about parameters is to simply drag the parameter (grab its name) to the Commandline (the input field below the Console). Another option is to check the resource files directly, in this case it's in <C4D install path>/resource/modules/c4dplugin/description/ttargetexpression.res, easily found if you know the ID of the entity (here Ttargetexpression) already.
So, with the above you get TARGETEXPRESSIONTAG_LINK. And then it's just a matter of tag->SetParameter(TARGETEXPRESSIONTAG_LINK, object, DESCFLAGS_SET_0).
One more note on your code, you shouldn't cast the Target tag into a Texture tag.
Last note, I moved this thread to the SDK Help forum, as you seem to prefer C++ instead of Python.