Am 09.07.2008 20:34, Lars Clausen schrieb:
Not quite true, e.g. almost no Elemet is a "connectio object", the one I know is "Standard - Text", but even that does not qualify for auto-routingOn Jul 9, 2008, at 7:50 PM, Fred Morcos wrote:Is it possible to get the type of an object without using a returned string (object_get_type)? I want to loop over all the selected objects and count the number of "connection objects" and the number of "other normal objects" without having to go through this: (pseudo code) if (objtype == "Standard - Line" || "UML - Generalization" || "UML - Dependency" || etc...)Many of the "connection objects" and "normal objects" inherit from a few top classes - Line, Arc, Polyline resp. Element.
The three base classes of "connection objects" are "Connection", "OrthConn" and "BezierConn". But this does not help much because there currently there is no way to get on the base class. And IMO using "dynamic cast" (or specific types) to solve the task at hand is the wrong approach anyway.
However, not all do, and some few objects have aspects of both types (Lifeline, for instance).
Yeah, add "Standard - Text" and "Standard - Line" at least ... Hans -------- Hans "at" Breuer "dot" Org ----------- Tell me what you need, and I'll tell you how to get along without it. -- Dilbert