PeterT Posted March 28, 2007 Share Posted March 28, 2007 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? Quote Link to comment
Yotarou Posted March 29, 2007 Share Posted March 29, 2007 I found this Tips last week. procedure test_GetSObj; const SelectedObjects = 2; TraverseShallow = 0; EditableLayers = 4; var hSObj :handle; function DoObject(h:handle):boolean; begin hSObj:= h; DoObject:= true; end;{DoObject} begin{main} hSObj:= nil; ForEachObjectInLayer(DoObject, SelectedObjects, TraverseShallow, EditableLayers); if hSObj = nil then Message('object = none') else Message('object type = ', GetType(hSObj)); end; Run(test_GetSObj); Quote Link to comment
Recommended Posts
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.