THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 19/05/2004 at 16:21, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 8.206
Platform: Windows ;
Language(s) : C++ ;
---------
Hi,
Im trying to retrieve an Point Selection Tag from an object via a LINK control in a UI.
Im attempting to get the SelectionTag, if there is none, I am trying to create a new BaseSelect and select all the elements inside.
If there was a SelectTag then Im trying to simply print out the amount of selected elements.
My code is
// Get the Point Selection link from the GUI
bsSelection = (BaseSelect* )data->GetLink(MAIN_LINKPOINTSELECTION, hh->GetDocument());
// If there is no PointSelection Tag, create a new internal one, and populate it
if(!bsSelection)
{
bsSelection = BaseSelect::Alloc();
bsSelection->SelectAll(0,lPointCount-1);
}
else
{
// Crashes on this line
GePrint(LongToString(bsSelection->GetCount()));
}
For some reason, I am crashing when there is a SelectionTag.
Any reason why?
Thanks