THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 13/08/2011 at 15:18, xxxxxxxx wrote:
Howdy,
OK, I can create a User Data popup menu, and I can detect if an object has a popup menu with this code:
Bool TestCommand::Execute(BaseDocument *doc)
{
BaseObject *op = doc->GetActiveObject();
if(op)
{
DynamicDescription *dd = op->GetDynamicDescription();
if(dd)
{
DescID dscID;
const BaseContainer *bc;
void *dscHnd = dd->BrowseInit();
while(dd->BrowseGetNext(dscHnd, &dscID, &bc))
{
GeData gData;
CDGetParameter(op,dscID,gData);
if(bc->GetLong(DESC_CUSTOMGUI) == CUSTOMGUI_LONG)
{
BaseContainer *cycle = bc->GetContainerInstance(DESC_CYCLE);
if(!cycle) GePrint(bc->GetString(DESC_NAME)+" - No DESC_CYCLE detected");
else
{
GePrint(bc->GetString(DESC_NAME)+" - DESC_CYCLE detected");
}
}
}
dd->BrowseFree(dscHnd);
}
}
EventAdd(EVENT_FORCEREDRAW);
return TRUE;
}
But, how would I get the number of entries that are in the popup menu?
I'm not only interested in the current value of the popup menu User Data, but I'd also like to know how many items are available in the popup menu.
Adios,
Cactus Dan