THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 24/03/2003 at 11:07, xxxxxxxx wrote:
2. I disagree... of course as soon as you know what GetActiveObject() does and what's he purpose of that method then you know.
Take a look at the entry in the C.O.F.F.E.E. reference before you point me to a C++ book (I read a few).
Considered that this is the cornerstone to access anything the description is just a tad short here. An example like the one that Helge provided does provide great insight and is not luxury.
-------------------
Sorry, no. The entry is very clear. What else do you want them to write? In front of the function there is the object-classtype that´ll be returned. What else do you need??? You got the returned type, you look into that class, you look into the inhereted classes. There´s nothing to add imo.
And the description:
Returns the currently active object in the document [CODE]doc
, or
NULL
if there is no active object.
[/CODE]
can it be clearer? Please tell me how you would have described it?
The SDK is a help file. In the coffee docs the first pages deal with classes, files, events & messages, basecontainers, filestructures and even basic syntax.
There are some tutorials that deal with matrices in the plugincafe. Those are the main things that are needed. I don´t think it´s too hard to click on the inherited class. Then you would have seen that the returned class object is BaseSelect and.....
Adding one or two sentences about handling selections would have saved a lot of trouble!
.... there IS even an example of pointselection handling in the COFFEE docs. In the BaseSelect class:
// Prints all selected points of an object
var obj = doc->FindObject("MyObject");
var select = obj->GetPointSelection();
var i = 0;
var found = 0;
for (i = 0; i < obje->GetPointCount(); i++)
{
if (found >= select->GetCount()) break;
if (select->IsSelected(i))
{
println(obj->GetPoint(i));
found++;
}
}
I understand if users are new to coding that it is hard to get in and a lotta questions occur (I have a lotta questions about the C++ SDK myself too) and the docs are not 100% complete but sometimes I think people are trying to put all the weight on MAXONs shoulders...
btw. have found the BaseSelect example within 20 seconds.