Jump to content

GetType inside of a group


Recommended Posts

How do you GetType of an object inside of a group?

I have a line inside of a group. If I enter the group and select the line, the OIP tells me that the selected object is a line. But if I run a vectorscript on this on this line with a GetType function it returns the integer 11 (group), not 1 (line).

In other words, a GetType function run on a selected object inside of a group finds the group not the selected object.

Is this working as intended, or is there some way around it?

Link to comment

I found this Tips last week.

procedure test_GetSObj;
SelectedObjects = 2;
TraverseShallow = 0;
EditableLayers = 4;
hSObj	:handle;

function DoObject(h:handle):boolean;
	hSObj:= h;
	DoObject:= true;

hSObj:= nil;
ForEachObjectInLayer(DoObject, SelectedObjects, TraverseShallow, EditableLayers);
if hSObj = nil then
	Message('object = none')
	Message('object type = ', GetType(hSObj));

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...