Han-Batch Duplicate to Target Container

From Vectorlab
Jump to: navigation, search


Duplicates all objects in a container to a target container. By Orso B. Schmid


{ Orso *********************************************** }
{ copies all objects from a source container to a target container }
PROCEDURE H_BatchDupToTargetContainer(sourceContainer, targetContainer: HANDLE);
	VAR
		dup, temp_h : HANDLE;
		temp_b : BOOLEAN;
	BEGIN
		temp_h := FIn3D(sourceContainer);
		WHILE (temp_h <> NIL) & (temp_h <> targetContainer) DO BEGIN
			dup := CreateDuplicateObject(temp_h, targetContainer);
			temp_h := NextObj(temp_h);
		END;
	END;