Topic Title

The DataCAD Developer Network (DDN) is an online resource for information and support for DCAL® (DataCAD Applications Language) developers as well as anyone interested in creating fonts, toolbars, hatch patterns, or linetypes for use in DataCAD.

// Then use this on the new layer name prior to committing it to the database{ 0 = ok }{ 1 = invalid character in layer name }{ 2 = name already used }{ 3 = name too short (0 chars) }function Check_Layer_Name(name: shortstring): asint;

// Main Function (Re-entrant State Machine)function Rename_Main(act: action; pl, pargs: pointer): wanttype;// The values stored in variables you define here will not be retained// between dispatcher calls because they are not pushed onto the stackvar retval: wanttype; { asint; } l: prenamel;

{ Section 2: Afirst - Tasks to perform only once } if act = afirst then begin // Initialize local state and other variables wrterr('Layer Renamer Version 1.0 by Joey Nips', true); l.state := 1; end

{ Section 4: Alast - If your macro has been interrupted by user action } else if act = alast then begin // If you're going to get blown off the stack... // (i.e.) the user pressed a hotkey, // then this is your last chance to clean up temporary data. end