Skip to content

Latest commit

 

History

History
64 lines (51 loc) · 1.49 KB

File metadata and controls

64 lines (51 loc) · 1.49 KB

EndContext

Description

Use this function in conjuction with BeginContext to have VW automatically accept or reject any changes that were made during the Begin/End block.

PROCEDURE EndContext(acceptOrReject : INTEGER);
def vs.EndContext(acceptOrReject):
    return None

Parameters

Name Type Description
acceptOrReject INTEGER Specify 0 to reject changes or 1 to accept changes

Remarks

If you do not use this construct and you create a temporary plug-in object that itself creates a new class, the new class will remain even after you delete the temporary plug-in object.

Examples

		UpdateSymbolDisplayControl(dialog1, controlID, symbolName, render, view);
		DelObj(h);
		isBeganContext := FALSE;
	EndContext(2);
	SetPref( kSuspendUndoPref, FALSE );
END;

EndContext( 1 );

{BeginGroup;}
TempNewSymHand := DuplicateParentSymbol(OldSymName,NewSymName);
{EndGroup;}
IF CreateSymbol THEN
	EndContext(1)
ELSE
	BEGIN
	{AlrtDialog(Concat('Preview ',NewSymName));}
	UpdateSymbolDisplayControl(dialog, kSymbolDisplay, NewSymName, RenderMode, View);
	EndContext(0);
	END;
import vs

# Use this function in conjuction with BeginContext to have VW automatically
# accept or reject any changes that were made during the Begin/End block.
acceptOrReject = 1

vs.EndContext(acceptOrReject)

See Also

VS Functions: BeginContext

Version

Availability: from VectorWorks12.5

Category