VS:HUngroup

From Vectorworks Developer
Revision as of 22:13, 28 May 2008 by Root (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

.VectorScript|VectorScript ..VS:Function Reference|Function Reference ..VS:Function_Reference_Appendix|Appendix

Description

Decomposes the referenced group into component objects.

PROCEDURE HUngroup(
h :HANDLE);
def vs.HUngroup(h):
    return None

Parameters

h HANDLE Handle to group.

Remarks

Example, from Beat Fleischli:

PROCEDURE ChangeGroupClass;
CONST
oldClass = 'Keine-2';
newClass = 'Keine';
VAR
oHd, lHd :HANDLE;
actClass, activeLayer :STRING;

PROCEDURE DoIt(h :HANDLE);
BEGIN
IF (GetType(h) = 11) AND (GetClass(h) = oldClass) THEN BEGIN
lHd := GetParent(h);
WHILE GetType(lHd) <> 31 DO lHd := GetParent(lHd);
Layer(GetLName(lHd));
DSelectAll;
oHd := FInGroup(h);
WHILE oHd <> NIL DO BEGIN
SetSelect(oHd);
oHd := NextObj(oHd);
END;
HUngroup(h);
Group;
DSelectAll;
END;
END;

BEGIN
actClass := ActiveClass;
activeLayer := GetLName(ActLayer);
NameClass(newClass);
ForEachObject(DoIt,(T=Group));
NameClass(actClass);
Layer(activeLayer);
END;
RUN(ChangeGroupClass);

Version

Availability: from VectorWorks8.5