FileInfo

Procedure FileInfo(VAR theFile,activeLayer,activeSym:STRING;VAR numLayers,numClasses,numSD,numRec:INTEGER);
BEGIN
		theFile:=GetFName;
		activeLayer:=GetLName(ActLayer);
		activeSymDf:=GetName(ActSymDef);
		
		numLayrs:=NumLayers;
		numClasses:=ClassNum;
		numSD:=SymDefNum;
		numRec:=NumRecords(NIL);
END;

What it does
Allows you to retrieve information about the open document: file name, active layer, active symbol, number of layers, number of classes, number of symbol defs, and number of records.


FileFillInfo

Procedure FileFillInfo(VAR fFillPat:INTEGER;VAR FFFore,FFBack:LONGINT);
VAR
    r,g,b:LONGINT;
BEGIN
	fFillPat:=FFillPat;
	FFillFore(r,g,b);
 	RGBToColorIndex(r,g,b,FFFore);
	FFillBack(r,g,b);
 	RGBToColorIndex(r,g,b,FFBack);
END;

What it does
Allows you to retrieve fill settings information about the open document: active fill pattern, active fill foreground and background colors.


FilePenInfo

Procedure FilePenInfo(VAR fPenStyle,fPenSize:INTEGER;VAR FPFore,FPBack:LONGINT);
VAR
	r,g,b:LONGINT;
BEGIN
	fPenStyle:=FPenPat;
	fPenSize:=FPenSize;
	FPenFore(r,g,b);
	RGBToColorIndex(r,g,b,FPFore);
	FPenBack(r,g,b);
	RGBToColorIndex(r,g,b,FPBack);
END;

What it does
Allows you to retrieve pen settings information about the open document: active pen style, pen width,active pen foreground and background colors.


LayerInfo

Procedure LayerInfo(LayerHd:HANDLE;VAR LayerName:STRING;VAR LayerScale:REAL;VAR LayerVis,TotalObjs,SelectObjs:INTEGER);
BEGIN
	LayerName:=GetLName(LayerHd);
	LayerScale:=GetLScale(Hd);
	LayerVis:=GetLVis(Hd);
	TotalObjs:=GetNumObjs(Hd);
	SelectObjs:=NumSObjs(Hd);
END;

What it does
Allows you to retrieve information about a layer: layer name, scale, visibility, total objects, total selected. You supply the handle to the layer.


CreateNewLayer

Procedure CreateNewLayer(LayerName:STRING;LayerScale,LayerVis:INTEGER;BaseZ,Thk:REAL;
LayerFF,LayerFB,LayerPF,LayerPB:LONGINT);
VAR
	LHd:HANDLE;
	DupLayerAbort : BOOLEAN;
BEGIN
	DupLayerAbort:=FALSE;
	
	LHd:=FLayer;
	WHILE (LHd<>NIL)&(NOT DupLayerAbort) DO BEGIN
		IF GetLName(LHd)=LayerName THEN
			DupLayerAbort:=TRUE
		ELSE
			LHd:=NextLayer(LHd);
	END;
	
	IF NOT DupLayerAbort THEN BEGIN
		Layer(LayerName);
		SetScale(LayerScale);
		SetZVals(BaseZ,Thk);
		LFillFore(LayerFF);
		LFillBack(LayerFB);
		LPenFore(LayerPF);
		LPenBack(LayerPB);
		IF LayerVis=0 THEN
			ShowLayer
		ELSE IF LayerVis=1 THEN
			GrayLayer
		ELSE IF LayerVis =2 THEN
			HideLayer;
	END;
END;

What it does
Allows you to create a complete setup for a single layer, including visibility, z values, and default layer colors. The function, when called, automatically checks the layer list for a duplicate name to prevent inadvertantly modifying any existing layers.


[Home][Next]