Skip to content

platform sdk door templates

Andre Lafleur edited this page Oct 8, 2026 · 9 revisions

About door templates

In Security Center, a door template contains reusable door configuration that you apply to one or more doors. Build a template once and apply it to every door that should share the same configuration.

A DoorTemplate (in Genetec.Sdk.Entities.AccessPoints.DoorTemplates) bundles four independent categories. Each category is enabled by a feature toggle on the template:

Toggle Category covered
IsDoorPropertiesEnabled Door behavior: timings, lock behavior, held-open and forced-open behavior.
IsHardwareMappingEnabled Physical inputs and outputs mapped to the door's logical access points.
IsHardwareSettingsEnabled Card-and-pin reader settings per door side.
IsAccessRulesEnabled Per-side access rule assignments.

Set the toggle for each category you want the template to manage. Mutating any property or descriptor in a category whose toggle is false raises SdkException with SdkError.InvalidOperation.

Creating a door template

Create the template through the engine and set the toggles for the categories you intend to configure:

DoorTemplate template = (DoorTemplate)engine.CreateEntity(
    "Standard perimeter door",
    EntityType.DoorTemplate);

template.IsDoorPropertiesEnabled = true;
template.IsHardwareMappingEnabled = true;
template.IsHardwareSettingsEnabled = true;
template.IsAccessRulesEnabled = true;

Configure only the categories whose toggle you set to true. The next sections describe how to populate each category.

Configuring door behavior

When IsDoorPropertiesEnabled = true, the template carries the door-behavior properties:

  • Grant and entry timings, in seconds: NormalGrantTime, ExtendedGrantTime, NormalEntryTime, ExtendedEntryTime. For example, set NormalGrantTime to 5 for five seconds.
  • Relock and held-open: DoorRelockOnClose, DoorRelockDelay, DoorHeldBehavior paired with DoorHeldOpenDelay, and MaskDoorOpenTooLongWhenUnlockedBySchedule.
  • Forced-open: DoorForcedBehavior.
  • Schedule-driven masking: MaskAccessWhenUnlockedBySchedule.
  • Request-to-exit: GrantOnRex, RexHoldoffWhileOpened, RexHoldOffAfterGrantDelay, RexHoldOffAfterClosedDelay.
  • Visitor escort enforcement: EnforceVisitorEscortRulesAlphaSide, EnforceVisitorEscortRulesBetaSide.
  • Anti-passback timing: MaximumDelayBetweenSwipes.

DoorHeldBehavior and DoorForcedBehavior are enums that select buzzer-suppression options. Setting any of these properties when IsDoorPropertiesEnabled is false raises SdkException with SdkError.InvalidOperation.

Hardware mapping

When IsHardwareMappingEnabled = true, the template maps physical inputs and outputs on a unit's interface module to the door's logical access points. Each mapping is an AccessPointSelectorDescriptor:

var entryReader = new AccessPointSelectorDescriptor(
    AccessPointType.CardReader,
    AccessPointSide.Alpha,
    "reader-1");

var sensor = new AccessPointSelectorDescriptor(
    AccessPointType.DoorSensor,
    AccessPointSide.Alpha,
    "input-1");

template.UpdateAccessPointSelectors(
    new List<AccessPointSelectorDescriptor>
    {
        entryReader,
        sensor,
    });

Read the current list with template.GetCurrentAccessPointSelectors(). The Get method returns a fresh list; mutating that list does not push changes back. Build a new list and pass it to UpdateAccessPointSelectors.

AccessPointType identifies the role of the physical device (CardReader, Rex, DoorSensor, DoorLock, Buzzer, EntrySensor, LockSensor, plus floor-control and intrusion variants). AccessPointSide selects which side of the door the device serves (Alpha, Omega, In, Out, plus extended values for direction-aware and intrusion sides). DeviceId is the identifier of the physical device on the interface module.

Set template.InterfaceModuleDeviceDefinition to the GUID of the interface module device definition the template targets. The setter requires IsHardwareMappingEnabled = true.

Card-and-pin settings

When IsHardwareSettingsEnabled = true, the template carries per-side card-and-pin reader configuration. Each entry is a CardAndPinSettingsDescriptor:

var alphaSide = new CardAndPinSettingsDescriptor(
    cardAndPinCoverage: scheduleGuid,
    cardAndPinTimeout: 15000,
    readerMode: ReaderMode.CardAndPin,
    side: AccessPointSide.Alpha);

template.UpdateCardAndPinSettings(
    new List<CardAndPinSettingsDescriptor>
    {
        alphaSide,
    });

Read the current settings with template.GetCurrentCardAndPinSettings().

  • CardAndPinCoverage is Guid? and points to a Schedule entity that scopes when the card-and-pin mode is active.
  • CardAndPinTimeout is int?, in milliseconds, and bounds how long the reader waits after the card before timing out. For example, 15000 is 15 seconds.
  • ReaderMode selects how the reader authenticates: None, CardOrPin, CardAndPin, or AssuranceProfile.
  • Side chooses which side of the door the entry applies to.

Access rule descriptors

When IsAccessRulesEnabled = true, the template carries per-side access rule assignments. Each entry is an AccessRuleDescriptor:

var alphaRule = new AccessRuleDescriptor(
    AccessPointSide.Alpha,
    accessRuleGuid);

template.UpdateAccessRuleDescriptors(
    new List<AccessRuleDescriptor>
    {
        alphaRule,
    });

Read the current list with template.GetCurrentAccessRuleDescriptors(). The AccessRule GUID points to an AccessRule entity in the system.

Applying the template

Apply projects the configured template onto a target door, using a specific access control unit and interface module:

template.Apply(doorGuid, unitGuid, interfaceGuid);

The four-argument overload accepts a createMissingConnections flag. When true, the call can create missing connections defined by the template.

Before either overload applies the template, matching existing connections on the target door are removed. For example, if the target door already has buzzer connections and the template defines a buzzer connection, the door's existing buzzer connections are removed before the template settings are applied.

template.Apply(
    doorGuid,
    unitGuid,
    interfaceGuid,
    createMissingConnections: true);

All three GUIDs must be non-empty. Passing Guid.Empty for any of them raises ArgumentException.

To list the doors the template has been applied to, call template.GetAppliedDoors().

See also

Platform SDK

Plugin SDK

Workspace SDK

Media SDK

Macro SDK

Web SDK

Synergis RIO

Media Gateway

Genetec Web Player

Clone this wiki locally