The main API for writing EEvision extensions (“Plugins”).

Hierarchy (View Summary)

Methods

  • Create an URL for loading and configuring an EDB database, optionally by modifying the URL of the currently loaded EEvision instance. The configuration encompasses, e.g.,

    • 100% filtering of 150% models,
    • attribute filtering (for a certain language)
    • activating logical mode, block mode, or wire filter mode (see EEvisionAPI.GetSchematicMode).

    Parameters

    • def: {
          edb?: string;
          f?: null | readonly ObjectID[];
          famo?: number;
          fattr?: null | string;
          fblock?: null | readonly string[];
          ff?: null | readonly string[];
          fsig?: null | string;
          fsigf?: null | readonly string[];
          fv?: null | readonly string[];
          fwt?: null | readonly string[];
          home?: null | string;
          plink?: null | string;
          tool?: null | string | readonly string[];
      }

      the activated options

      • Optional Readonlyedb?: string

        Name of the EDB file to load. The filename must be relative to the web server's dataRoot.

      • Optional Readonlyf?: null | readonly ObjectID[]

        Module IDs for filtering EDB data to 100% model.

      • Optional Readonlyfamo?: number

        Filter attributes mode.

        Different attribute modes are no longer supported. The default mode supports a default language in case no translation of the target language is available (equivalent to famo=2).

      • Optional Readonlyfattr?: null | string

        Enables the "filter attributes" post-process by specifying the suffix to attribute names.

      • Optional Readonlyfblock?: null | readonly string[]

        Enables the filter-block post-process; additional flags can be specified.

      • Optional Readonlyff?: null | readonly string[]

        Flags for filtering EDB data to a 100% model.

      • Optional Readonlyfsig?: null | string

        Enables the filter-by-signal post-process. Optionally an attribute name can be specified that has the signal name as its value. If no signal name should be used, set the parameter to the empty string.

      • Optional Readonlyfsigf?: null | readonly string[]

        Flags for the filter-by-signal process.

      • Optional Readonlyfv?: null | readonly string[]

        Activated/set variables for filtering EDB data to a 100% model.

      • Optional Readonlyfwt?: null | readonly string[]

        Enables the filter-wire-types post-process by listing the types of wires that should be preserved.

      • Optional Readonlyhome?: null | string

        Link that is opened when the user clicks on the "Home" button.

      • Optional Readonlyplink?: null | string

        Permalink to a stored EEvision state.

      • Optional Readonlytool?: null | string | readonly string[]

        Available license features: "pro", "signoff", "edbdiff", "docgen". "basic" licensing is always available.

    • update: boolean = false

      if true then the current EEvision parameters are updated using the new ones in def.

    Returns Promise<string>

    a string with the corresponding URL search parameters, including the "?" prefix.

    This function can be called before EEvision has been initialized as long as update is not set to true.

  • Call a function of a server-side extension after it has been loaded using EEvisionAPI.LoadServerPlugin.

    Parameters

    • name: string

      name of the server-side extension (without the file extension .tcl of the script)

    • command: string

      name of the function to be called.

    • Optionalparams: readonly string[]

      (optional) parameters for the called function. Note that the loaded EDB is automatically added as the first parameter of the function.

    Returns Promise<string>

    the string returned by the server-side function.

  • Create a permanent link for the current schematic. It can be used to re-create the same situation again. The link is stored in a file on the server and becomes invalid when this file is deleted.

    Returns Promise<string>

    the query part of the link (including the ? at the beginning). The caller has to add the protocol and url of the server.

  • This function returns information about the license used for EEvision. This includes the type of license (Altair Units / FlexNet) and the expiry date.

    Returns Promise<LicenseInfo>

    information about the EEvision license.

  • If the webserver on which EEvision is hosted uses basic authentication, this function allows to retrieve information about the authenticated user like the username, his/her IP address, and hostname.

    Returns Promise<null | UserInfo>

    information about the user if available.

  • Explode or collapse the connector of a component. Collapsing hides all currently unconnected cavities, exploding a connector shows all cavities. If the connector is already collapsed/exploded, nothing happens. The connector must be available on the canvas.

    Parameters

    • connector: ObjectID

      the ID of the connector of a component.

    • Optionalcollapse: boolean

      if true, collapse the connector; if false, explode it. if not specified (or undefined), the connector is toggled.

    Returns Promise<boolean>

    true if the connector is collapsed after the call, false otherwise.

    An ObjectError is thrown if the object is not loaded or if the object is not a collapsible connector.

Canvas Control

  • Add an array of objects to the canvas. The objects that were loaded before, are not removed. Modules are also admissible objects. In this case, all members of the module are loaded.

    Parameters

    • id_list: ObjectID | readonly ObjectID[]

      the Object IDs of the objects that should be added to the schematic. If the list is empty, nothing happens.

    Returns Promise<void>

  • Scroll the EEvision canvas such that the object with the given ID is in the center of the canvas. In case an array of object IDs is passed to the function, the center of the joint bounding box of these objects is centered.

    Parameters

    Returns Promise<void>

  • Clear the EEvision canvas, i.e., remove the visible schematic.

    Returns Promise<void>

  • The ExtractOne function extracts all wires and components that are electrically connected to the object (component, connector, cavity) that is passed as the function's first parameter.

    An exception is thrown if an invalid object should be extracted. Only components, connectors, and cavities are valid objects, but not wires, multicores, modules, and the database root.

    Parameters

    Returns Promise<boolean>

    true iff the extraction was limited by options.extractMax, i.e., if the schematic does not contain all electrically connected objects.

  • Zoom the schematic such that it fits onto the canvas (in one or both dimensions).

    Parameters

    • mode: FullfitMode = "xy"

      the dimensions in which the schematic should fit.

      • "x": horizontally
      • "y": vertically
      • "xy": both horizontally and vertically.

    Returns Promise<void>

  • Determine the bounding box of an EDB object.

    Parameters

    Returns Promise<null | BBox>

    the bounding box or null if the object is currently not displayed.

  • Get the currently selected objects. The most recently selected object (i.e., in netMode the object that the user actually selected) is the first entry in the list. If nothing is selected, the result is an empty array.

    Returns Promise<ObjectInfo[]>

    for each selected object: its EDB ID, its type, name and sub-type. Note that the attribute list is not part of the returned object info.

  • Return true if the Nlview canvas is empty.

    Returns Promise<boolean>

    If nets are loaded that are not connected to any instance or port, Nlview does not render anything, but the canvas is not considered empty.

  • Load a spanning tree that connects all devices (ECUs, LECUs, HIERECUs, SVG components) with at least one wire (if it is possible). That means, the schematic afterwards contains all devices, but not all wires, splices, eyelets, or inliners.

    Returns Promise<void>

  • Add an array of objects to the schematic. The objects that were loaded before are removed and replaced by the new objects. Modules are also admissible objects. In this case, all members of the module are loaded. If the list of objects is empty or null, the canvas is cleared.

    Parameters

    Returns Promise<void>

  • Try to improve the schematic by local optimizations. Hereby the components keep their relative positions, but the wire routing is optimized. Additionally, the connectors of selected components are allowed to change their direction (left/right).

    Returns Promise<void>

  • Determine the ID of the EDB object which is located at the point of the mouse click.

    Parameters

    • event: {} | {}

      the information about the mouse click (essentially a MouseEvent without functions as they cannot be serialized).

    Returns Promise<null | ObjectInfo>

    the Object ID of the object (null if there is no object at the click location).

  • Regenerate the current schematic. This function is useful when the schematic has become confusing after interactive navigation.

    Parameters

    • allow_pos_change: boolean = false

      if true, the components may change their position in the schematic.

    Returns Promise<void>

  • Export the current schematic as an SVG image.

    Parameters

    • highlight: boolean = false

      whether to show the highlight colors in the schematic

    • mode: ExportMode = "fullfit"

      which part of the schematic should be exported?

    Returns Promise<string>

    an SVG image as a string.

  • This function changes the scroll position of the current schematic in the viewport defined by the canvas window. The given relx and rely parameter values are relative floating numbers in the range between -1.0 and 1.0. A negative value for relx shifts leftwards, a negative value for rely shifts upwards. The ScrollBy function applies limits to avoid scrolling the schematic diagram outside of the viewport.

    Parameters

    • relx: number

      the amount to scroll in horizontal direction (positive value means to the right).

    • rely: number

      the amount to scroll in vertical direction (positive number means down).

    Returns Promise<void>

    The following example shifts the current schematic towards right by 30% of the window width.

    API.ScrollBy(0.3, 0);
    
  • Change the set of selected EDB objects.

    Only objects that have been loaded onto the EEvision canvas can be selected.

    If EEvision's netMode is active and the id_list contains wires, the wires that are electrically connected to the ones in id_list are added to id_list before changing the selection.

    Parameters

    • id_list: null | ObjectID | readonly ObjectID[]

      the EDB ID(s) of the object(s) whose selection status should be changed.

    • operation: SelectionOperation = "replace"

      specifies how to change the set of selected elements.

    • Optionaldata: unknown

      additional data that is passed to the registered selection handler. The data passed here must be serializable, i.e., not contain functions etc. For details on the serialization, see the structured clone algorithm.

    Returns Promise<void>

    eevision/api.ObjectError This exception is thrown if

    • the parameter id_list is not a valid ObjectID or list of ObjectIDs or null.
    • an ID from the list does not exist in the EDB;
    • an ID from the list is currently either not displayed in EEvision or an EDB module and therefore not selectable.
  • Set the zoom factor of EEvision. See the Nlview documentation for details.

    Parameters

    • value: string | number

      the new zoom factor for EEvision.

    Returns Promise<void>

    Use EEvisionAPI.GetZoom to retrieve EEvision's zoom factor.

  • Remove a list of objects from the canvas. In case of wires and components, the object is actually removed. In case of connectors and cavities, they are unconnected and the cavities are hidden.

    Parameters

    Returns Promise<void>

    The list of objects must not contain modules.

  • Adds connected wires connected to the start object to the canvas. If netmode enables, all electrically connected wire and components are added. If netmode is disabled, only the directly connected components are added.

    Parameters

    • id: ObjectID

      Object ID of double clicked object

    • Optionaloptions: { follow?: boolean }

      follow true: only already connected wires of an inliner are expanded, false: all wires are expanded

      • Optional Readonlyfollow?: boolean

        If true, follow currently visible wires through inline connectors.

    Returns Promise<void>

    id: cannot be a module id,

Configuration

  • Change the current configuration of EEvision. Note that this might lead to a re-initialization of EEvision if the changes affect the server process, calling the EEvisionAPI.onSchematicChange handler.

    Parameters

    • new_config: Partial<Config>

      the changed entries of the configuration. Entries with unchanged values can be omitted.

    Returns Promise<Config>

    the new configuration (with all keys, not only the changed ones).

    • Changing the value of CoreConfig.showArcs clears the canvas.
    • To reset the whole colorscheme to default, use
    await API.ChangeConfig({ colorscheme: null });
    
    • To set some properties of the colorscheme back to the default value, set it to null or the empty string. For example, to reset "backgroundcolor" to the default (white), you can use one of
    await API.ChangeConfig({ colorscheme: { backgroundcolor: "" } });
    await API.ChangeConfig({ colorscheme: { backgroundcolor: null } });

Database Query

  • This function requests a JSON string of a list of objects, identical to EEvisionAPI.QueryJsonList above, but instead of returning all EDB objects, it returns only those objects that are currently loaded to the schematic canvas. The parameters are identical to those of EEvisionAPI.QueryJsonList.

    Parameters

    • objects: readonly ObjectType[] = []

      Limit the result to the objects of the given types. If the list is empty or missing, then objects of all types are returned.

    • flat: boolean = false

      if true, switch the query request into flat mode; then the resulting list contains only objects without nested objects. If flat = false, each component object will include all its connectors in a nested way; and each connector object will include all its cavities in a nested way; each multicore object will include all its child multicores in a nested way.

    Returns Promise<string>

    a JSON string with the requested information. The user will typically apply JSON.parse(...) to that result string.

  • Alpha

    Get access to the currently loaded Edb database by downloading it from the server.

    Returns Promise<
        {
            components(): Generator<EdbComponent, void, any>;
            GetObj(id: number): undefined | EdbObject;
            modules(): Generator<EdbModule, void, any>;
            multicores(): Generator<EdbMulticore, void, any>;
            wires(): Generator<EdbWire, void, any>;
        },
    >

    the downloaded EDB. The EDB API is in an experimental state and not yet to be used in production!

    • For large databases, downloading can take some time. The downloaded
    • database is stored in browser memory.
    • The Edb object is cached, i.e., if this function is called a second time, the EDB is not downloaded again.
    • The Edb must not be modified.
  • Return information about an EDB database object or the database root node. This information encompasses the object type, sub-type, name, and its attributes.

    Parameters

    • id: null | ObjectID

      the EDB object ID or null for the database root.

    • collate: boolean = true

      if true then all values of attributes with the same name are merged into one entry. The relative order of the values is preserved.

    Returns Promise<ObjectAttrInfo>

    the object information.

  • Search the EDB database for objects that match a given string. The string can appear either in the object name or in the values of a set of user-specified attributes. The search can be limited to objects of certain types and to a maximum number of returned results.

    Parameters

    • str: string

      the search string

    • Optionaloptions: {
          otype?: ObjectType | "any" | "most";
          searchAttrs?: readonly string[];
          searchMax?: number;
          searchMode?: LiveSearchMode;
          stype?: null | string;
      }

      configuration of the search (object types, searched attributes, maximum number of results, ...)

      • Optional Readonlyotype?: ObjectType | "any" | "most"

        Type of object to search for (e.g., "component", "connector", ...). If the value is "any", objects of all types are taken into consideration (including cavities); if the value is "most", then all types except cavities are considered.

        "any"

      • Optional ReadonlysearchAttrs?: readonly string[]

        List of attribute that EEvision should take into account for the search.

        []

      • Optional ReadonlysearchMax?: number

        Maximum number of search results to return.

        A value of 0 means: unlimited.

        0

      • Optional ReadonlysearchMode?: LiveSearchMode

        Specifies whether EEvision should search the whole EDB database on the server (value "edb") or only the currently displayed schematic (value "scm").

        "edb"

      • Optional Readonlystype?: null | string

        Limit the search to objects of a certain subtype (e.g., for wire to power or ground wires). If the value is null, all objects of the current type are taken into consideration.

        null

    Returns Promise<[...LiveSearchResult[], null] | LiveSearchResult[]>

    an array with the search results. If not all matches are returned because of the limit, the last entry of the returned array is null.

  • This function requests a list of objects, represented as a JSON string. Each of those objects corresponds to one EDB object.

    Parameters

    • objects: readonly ObjectType[] = []

      Limit the result to the objects of the given types. If the list is empty or missing, then objects of all types are returned.

    • flat: boolean = false

      if true, switch the query request into flat mode; then the resulting list contains only objects without nested objects. If flat = false, each component object will include all its connectors in a nested way; and each connector object will include all its cavities in a nested way; each multicore object will include all its child multicores in a nested way.

    Returns Promise<string>

    a JSON string with the requested information. The user will typically apply JSON.parse(...) to that result string.

  • This function searches for all objects with the given name. The name match may be limited to objects of certain types.

    Parameters

    • name: string

      the name of the object to look for.

    • objects: readonly ObjectType[] = []

      Limit the search to the objects of the given types. If the list is empty or missing, then objects of all types are returned.

    • flat: boolean = false

      if true, switch the query request into flat mode; then the resulting list contains only objects without nested objects. If flat = false, each returned component object will include all its connectors in a nested way; and each connector object will include all its cavities in a nested way; finally, each multicore object will include all its child multicores in a nested way.

    Returns Promise<string>

    a JSON string with the requested information. The user will typically apply JSON.parse(...) to that result string.

  • Retrieve the stored information about an object from the database on the server.

    Parameters

    • id: ObjectID

      the EDB object ID

    • flat: boolean = false

      if true, switch the query request into flat mode; then the resulting object does not include nested objects. If flat = false, a component object will include all its connectors in a nested way; and a connector object will include all its cavities in a nested way; a multicore object will include all its child multicores in a nested way.

    Returns Promise<string>

    a JSON string with the requested information. The user will typically apply JSON.parse(...) to that result string.

Direct Nlview Interaction

  • Directly call Nlview, the rendering engine used by EEvision. Use this function with care as it can interfere with EEvision in hard-to-predict ways.

    Parameters

    • cmd: string

      the Nlview command (see Nlview Core API for more information)

    • ...args: readonly string[]

      the arguments for the Nlview command.

    Returns Promise<string>

    the Nlview result as a string.

  • Directly call Nlview, the rendering engine used by EEvision. Use this function with care as it can interfere with EEvision in hard-to-predict ways.

    Parameters

    • cmd: readonly string[]

      the Nlview call as an array of strings; the first entry is the command, the remaining ones the parameters (see Nlview Core API for more information)

    Returns Promise<string>

    the Nlview result as a string.

  • Download a file that is stored in Nlview's local file system.

    Parameters

    • filename: string

      the name of the file.

    Returns Promise<void>

Event Handlers

onContextMenu: null | ContextMenuHandler = null

This handler is called whenever the user requests opening a context menu, e.g., by pressing the right mouse button on an Nlview object.

onError: null | ErrorHandler = null

Handler that is called whenever an error occurs that is not directly caused by an API call, e.g., when interactive navigation or the server communication fails.

onHistoryRequest: null | HistoryRequestHandler = null

This handler is called by the EEvision core whenever a new history state needs to be created (using EEvisionAPI.PushHistoryState) or when the current history state is updated (using EEvisionAPI.UpdateHistoryState).

onHistoryRestore: null | HistoryRestoreHandler = null

This handler is called whenever the user goes forward or backward in the browser history and EEvision needs to restore a history state.

onPageChange: null | PageChangeHandler = null

This handler is called whenever (1) the current page has switched to a different number, (2) the total number of pages has changed, (3) the current Nlview module has changed, or (4) the current Nlview module was cleared.

This handler is only useful when automatic page splitting has been activated in EEvision. By default, when page splitting is de-activated, EEvision's schematic has exactly one page.

onPendingChange: null | PendingChangeHandler = null

This handler is called whenever the number of pending server requests changes.

onSchematicChange: null | SchematicChangeHandler = null

This handler is called whenever the contents of the schematic changes, i.e., when components or wires are added or removed. It is not called, when only the layout changes, but the set of objects stays the same.

onSelection: null | SelectionHandler = null

This handler is called whenever the selection of objects in EEvision changes. If the parameter is null, then all objects have been unselected; otherwise selected gives information about the newly selected object.

  • Set an handler for a certain attribute. The handler function is called whenever the attribute with its values should be shown in the info window or the balloon window and is supposed to return an array of table row elements. For every attribute only a single handler can be set. Setting a new handler overwrites the old one. To remove a handler, call SetAttributeHandler(attr_name, undefined).

    Parameters

    • attr_name: string

      the name of the attribute

    • handler: undefined | AttributeHandler

      the function that handles this attribute or undefined for removing the current handler.

    Returns undefined | AttributeHandler

    the old attribute handler or undefined if there hasn't been a handler for that attribute before.

GUI Handling

  • Create a button for the plugin.

    Parameters

    Returns HTMLButtonElement

    the button element.

  • Create a dialog window, consisting of a header and a content <div>.

    Parameters

    Returns [HTMLDialogElement, HTMLElement, HTMLDivElement]

    a tuple containing the <dialog> element, the <header> element, and the content <div;> element (in this order). The DOM element of the dialog has not yet been attached to the main document.

  • Show a message in the error window of EEvision.

    Parameters

    • msg: string | Error

      the message to display.

    • type: ErrorSeverity = "error"

      the type of message (error, warning, info).

    Returns void

  • Fetch an HTML dialog window from the server and return it as an HTML DOM Element. Note that the outermost tag (apart from <html> and <body>) must be a <dialog> element.

    Parameters

    • filename: string

      the filename of the HTML fragment (relative to the plugins/ directory).

    • Optionaloptions: Partial<FetchWindowOptions>

      configuring the loaded dialog (like adding buttons for closing and minimizing the dialog).

    Returns Promise<[dialog: HTMLDialogElement, style: null | HTMLStyleElement]>

    the dialog element and – if available – the corresponding style element. Neither has been added to the main document yet.

    <!DOCTYPE html>
    <html>
    <body>
    <dialog id="...">
    <header>
    <h2>Title of the dialog window</h2>
    ...
    </header>
    <div class="content">...</div>
    </dialog>
    </body>
    </html>
  • Re-enable the GUI and remove the waiting spinner.

    Returns void

  • Disable the GUI and show the waiting spinner to signal the user that we wait for something.

    Parameters

    • Optionallabel: string

      a short text string that describes what is happening (e.g., "Loading ...");

    Returns void

  • Assign a new text label to the waiting spinner.

    Parameters

    • Optionallabel: string

      the new text.

    Returns void

Highlight API

  • Change the highlighting of objects.

    Parameters

    • idMap: ReadonlyMap<ObjectID, null | number>

      a mapping of object IDs to the desirec highlight slot. If the slot is null the object is unhighlighted.

    • update: boolean = true

      if true, then the changes will be directly applied; if false, the updates are registered, but not applied yet. This allows to accumulate several sets of updates before applying them, thereby avoiding flickering.

    Returns Promise<void>

  • Return the highlight slot of an EDB object or null if the object is not highlighted.

    Parameters

    Returns Promise<null | number>

    the number of the highlight slot or null if not highlighted.

  • Retrieve the highlight slots of all currently highlighted objects.

    Returns Promise<HighlightInfo>

    an object mapping the object IDs of all highlighted objects to their highlight slots.

  • Highlight a list of objects on the canvas.

    Highlighting is done by assigning objects to a slot between HIGHLIGHT_MIN_SLOT and HIGHLIGHT_MAX_SLOT. Each slot can be given a color using the API function EEvisionAPI.SetHighlightColor.

    Parameters

    • slot: number

      the highlight slot (between HIGHLIGHT_MIN_SLOT and HIGHLIGHT_MAX_SLOT).

    • id_list: ObjectID | readonly ObjectID[]

      the list of object IDs of those objects that should be highlighted with the color of the given slot.

    • operation: "replace" | "update" = "update"

      specifies whether the current highlighting should be updated with the new object list or whether the new highlight should replace the existing highlight.

    • update: boolean = true

      if false then the schematic is not immediately updated to reflect the changed highlighting. This way, one can accumulate changes and apply them at once to avoid flickering.

    Returns Promise<boolean>

    true if the highlighting has changed.

  • Set the color of a highlight slot. See EEvisionAPI.Highlight for more information on EEvision's highlighting functionality.

    Parameters

    • slot: number

      the highlight slot (between HIGHLIGHT_MIN_SLOT and HIGHLIGHT_MAX_SLOT).

    • color: string

      the highlight color for that slot (RGB value of the form #RRGGBB in hexadecimal notation).

    Returns Promise<void>

  • Remove the highlighting from a list of EDB objects (or all highlighted objects if null is passed to the function).

    Parameters

    • id_list: null | ObjectID | readonly ObjectID[]

      the list of EDB objects that should be un-highlighted (or null if that should be done for all currently highlighted objects). Objects that are not highlighted are ignored.

    • update: boolean = true

      if false then the schematic is not immediately updated to reflect the changed highlighting. This way, one can accumulate changes and apply them at once to avoid flickering.

    Returns Promise<boolean>

    true if the highlighting has changed.

History

onHistoryRequest: null | HistoryRequestHandler = null

This handler is called by the EEvision core whenever a new history state needs to be created (using EEvisionAPI.PushHistoryState) or when the current history state is updated (using EEvisionAPI.UpdateHistoryState).

onHistoryRestore: null | HistoryRestoreHandler = null

This handler is called whenever the user goes forward or backward in the browser history and EEvision needs to restore a history state.

  • Return the current position in the history stack of EEvision. Note that this value is at most history.length, but might be smaller if a different page had been loaded in the same browser tab before the current EEvision session. This value denotes how many steps one can go back in the browser history without leaving the current EEvision session.

    Returns Promise<number>

  • Restore a previously retrieved state of EEvision.

    Parameters

    • state: {
          config: {
              autoOptimize: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7;
              autoZoom: boolean;
              busWire: string;
              cavAttrdsp: null | string;
              colorscheme: {
                  attrcolor?: string;
                  backgroundcolor?: string;
                  boxcolor0?: string;
                  boxcolor3?: string;
                  boxinstcolor?: string;
                  boxpincolor?: string;
                  buscolor?: string;
                  fillcolor1?: string;
                  fillcolor2?: string;
                  fillcolor3?: string;
                  fillcolor6?: string;
                  netcolor?: string;
                  objectgray?: string;
                  overlaycolor?: string;
                  portcolor?: string;
                  rippercolor?: string;
              };
              compAttrdsp: readonly string[];
              connAttrdsp: readonly string[];
              explodeSplices: boolean;
              groundWire: string;
              hierColor: null
              | string;
              hvWire: string;
              license: null | string;
              logicalWire: string;
              multicores: "none" | "bundle" | "basic" | "full";
              powerWire: string;
              preciseAppear: boolean;
              rectangleColor: string;
              rectangleSelection: "none" | "components" | "wires" | "both";
              rotate90: boolean;
              selectColor: null | string;
              space4wirelabel: boolean;
              wireBot: boolean;
              wireBotAttr: null | string;
              wireBotFmt: string;
              wireMark: boolean;
              wireTop: boolean;
              wireTopAttr: null | string;
          };
          extern: any;
          grayMode: boolean;
          highlightObjects: readonly (
              | readonly (readonly (number | ObjectID)[])[]
              | readonly (undefined | string)[]
              | readonly (readonly (null | number | ObjectID)[])[]
          )[];
          historyCount: number;
          last_selection: null | string;
          mtime: null | string;
          netMode: boolean;
          schematic: null | string;
          selection: null | string;
          title?: string;
          url?: string;
          viewport: null | string;
      }

      the EEvision state that needs to be restored.

      • Readonlyconfig: {
            autoOptimize: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7;
            autoZoom: boolean;
            busWire: string;
            cavAttrdsp: null | string;
            colorscheme: {
                attrcolor?: string;
                backgroundcolor?: string;
                boxcolor0?: string;
                boxcolor3?: string;
                boxinstcolor?: string;
                boxpincolor?: string;
                buscolor?: string;
                fillcolor1?: string;
                fillcolor2?: string;
                fillcolor3?: string;
                fillcolor6?: string;
                netcolor?: string;
                objectgray?: string;
                overlaycolor?: string;
                portcolor?: string;
                rippercolor?: string;
            };
            compAttrdsp: readonly string[];
            connAttrdsp: readonly string[];
            explodeSplices: boolean;
            groundWire: string;
            hierColor: null
            | string;
            hvWire: string;
            license: null | string;
            logicalWire: string;
            multicores: "none" | "bundle" | "basic" | "full";
            powerWire: string;
            preciseAppear: boolean;
            rectangleColor: string;
            rectangleSelection: "none" | "components" | "wires" | "both";
            rotate90: boolean;
            selectColor: null | string;
            space4wirelabel: boolean;
            wireBot: boolean;
            wireBotAttr: null | string;
            wireBotFmt: string;
            wireMark: boolean;
            wireTop: boolean;
            wireTopAttr: null | string;
        }

        The current EEvision configuration

        • ReadonlyautoOptimize: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7

          Should EEvision optimize the current schematic automatically whenever it changes? This typically leads to clearer schematics, but creates more movement when incrementally expanding the schematic.

          The value of this option is a combination of bits which individually control schematic optimization on certain events.

          BitMeaning
          AutoOptimize.SCHEMATIC = 0x0001 If set, then optimize after each change of the schematic content (but not after position changes, e.g., due to manual user interaction).
          AutoOptimize.CONNECTOR = 0x0002 If set, optimize whenever a connector is opened or closed by clicking on the [+] / [-] button of the connector.
          AutoOptimize.HIERARCHY = 0x0004 If set, optimize whenever a hierarchical component is folded or unfolded.

          The value of the setting is an arbitrary combination of these bits.

          0 (= disabled = AutoOptimize.NONE).

        • ReadonlyautoZoom: boolean

          Determines whether EEvision's autoZoom mode is active or not.

          EEvision has an autoZoom mode, in which the schematic is zoomed automatically to fit the canvas whenever the schematic changes.

          Limitation: Expanding and shrinking the connectors of ECU components is currently not covered by the autoZoom mode.

          false

        • ReadonlybusWire: string

          Determine how buses (i.e., wires with type EdbWireTBUS) should be displayed in EEvision.

          • "std": use the default style for the wire
          • color value (either hexadecimal RGB value like "#FF00FF" for red or one of the SVG color names): Display the wire with the specified color.

          "std"

        • ReadonlycavAttrdsp: null | string

          Which attribute should be shown next to cavities of (L)ECUs?

          In contrast to component (CoreConfig.compAttrdsp and connectors (CoreConfig.connAttrdsp), cavities can carry at most one displayed attribute.

          null

        • Readonlycolorscheme: {
              attrcolor?: string;
              backgroundcolor?: string;
              boxcolor0?: string;
              boxcolor3?: string;
              boxinstcolor?: string;
              boxpincolor?: string;
              buscolor?: string;
              fillcolor1?: string;
              fillcolor2?: string;
              fillcolor3?: string;
              fillcolor6?: string;
              netcolor?: string;
              objectgray?: string;
              overlaycolor?: string;
              portcolor?: string;
              rippercolor?: string;
          }

          This is the color scheme of EEvision that is used for rendering schematics.

          {}, i.e., EEvision uses the lightblue color scheme of its rendering engine Nlview.

          • Optional Readonlyattrcolor?: string

            Specifies the color for the "@attr", "@val", "@vconn", "@vconn2" and user-defined pin attributes (see attribute displays).

          • Optional Readonlybackgroundcolor?: string

            Specifies the background color for the schematic.

          • Optional Readonlyboxcolor0?: string

            Specifies the color of the outline of components.

          • Optional Readonlyboxcolor3?: string

            Specifies the color of unconnected pins.

          • Optional Readonlyboxinstcolor?: string

            Specifies the instance-name color for the symbols.

          • Optional Readonlyboxpincolor?: string

            Specifies the pin color for the symbols.

          • Optional Readonlybuscolor?: string

            Specifies the color of the netBundles and netBundle names.

          • Optional Readonlyfillcolor1?: string

            Fill color for the body of UNDEF, ECU, HIER, and EYELET components.

          • Optional Readonlyfillcolor2?: string

            Fill color for the connectors of HIER, ECU, and INLINER components.

          • Optional Readonlyfillcolor3?: string

            Fill color for connectors of ECU and Inliner components that have no connected cavity.

          • Optional Readonlyfillcolor6?: string

            Fill color for the body of INLINER components.

          • Optional Readonlynetcolor?: string

            Specifies the color of the wires and wire names.

          • Optional Readonlyobjectgray?: string

            Specifies the graymode color.

          • Optional Readonlyoverlaycolor?: string

            Specifies the color of the so called overlay buses (artificial bundles, displayed whenever two or more different nets and/or netBundles connect to the same pinBus/portBus).

          • Optional Readonlyportcolor?: string

            Specifies the body and pin color for both port symbols and net page connectors (in page splitting mode).

          • Optional Readonlyrippercolor?: string

            Specifies the color of the bus rippers. The color set here is also used for slash rippers.

        • ReadonlycompAttrdsp: readonly string[]

          Which component attributes should be shown in addition to the component name above the component?

          [] (empty list)

        • ReadonlyconnAttrdsp: readonly string[]

          Which connector attributes (of ECUs and inliners) should be shown next to the connector?

          [] (empty list)

        • ReadonlyexplodeSplices: boolean

          If true, unconnected “pins” of splices and eyelets are displayed; otherwise they are hidden. This feature is useful to see whether all wires that connect to a splice or eyelet are currently displayed in EEvision.

        • ReadonlygroundWire: string

          Determine how ground wires (i.e., wires with type EdbWireTGROUND) should be displayed in EEvision.

          • "std": use the default style for the wire
          • color value (either hexadecimal RGB value like "#FF00FF" for red or one of the SVG color names): Display the wire with the specified color.

          "std"

        • ReadonlyhierColor: null | string

          Color used for highlighting matching connectors in a hierarchical design. The value must be a hexadecimal RGB-value of the form "#RRGGBB".

          "#1A1AFF"

        • ReadonlyhvWire: string

          Determine how high-voltage wires (i.e., wires with type EdbWireTHV) should be displayed in EEvision.

          • "std": use the default style for the wire
          • color value (either hexadecimal RGB value like "#FF00FF" for red or one of the SVG color names): Display the wire with the specified color.

          "std"

        • Readonlylicense: null | string

          EEvision offers the possibility to use a web service for licensing. If that option is used, the URL of the web service should be entered here. By default, licensing is done on the server side using either a FlexNet or Altair license.

          null

        • ReadonlylogicalWire: string

          Determine how logical connections (i.e., wires with type EdbWireTLOGICAL) should be displayed in EEvision.

          • "std": use the default style for the wire
          • color value (either hexadecimal RGB value like "#FF00FF" for red or one of the SVG color names): Display the wire with the specified color.

          "std"

        • Readonlymulticores: "none" | "bundle" | "basic" | "full"

          Determines how multicores are rendered in EEvision.

          Value Meaning
          "none" Do not show multicores.
          "bundle" Show multicores as wire bundles.
          "basic" Only show well-behaving multicores that can be rendered as part of a component.
          "full" Show all multicores (including the ones that require a routing channel).

          "none"

        • ReadonlypowerWire: string

          Determine how power wires (i.e., wires with type EdbWireTPOWER) should be displayed in EEvision.

          • "std": use the default style for the wire
          • color value (either hexadecimal RGB value like "#FF00FF" for red or one of the SVG color names): Display the wire with the specified color.

          "std"

        • ReadonlypreciseAppear: boolean

          The selection appearance. If true, then selecting a component really only selects the body of the component; if false, then selecting the component also selects all its connectors.

          true

        • ReadonlyrectangleColor: string

          Color of the rectangle that is drawn when selecting objects via the rectangleSelection mechanism.

          `"#553399"
          
        • ReadonlyrectangleSelection: "none" | "components" | "wires" | "both"

          Allow the selection of objects using <Ctrl> + dragging the mouse with the left button pressed. The values have the following meaning:

          Value Meaning
          "none" the rectangle selection mechanism is disabled.
          "components" only components are selected.
          "wires" only wires are selected.
          "both" both components and wires are selected.

          CoreConfig.rectangleColor for setting the color of the selection rectangle.

          "none"

        • Readonlyrotate90: boolean

          Display the schematic rotated by 90° (i.e., top to bottom instead of left to right).

          false (not rotated)

        • ReadonlyselectColor: null | string

          Color used for highlighting selected objects. If set to null, no selection color is applied, but the object is drawn with ticker lines.

          "#D4772A"

        • Readonlyspace4wirelabel: boolean

          If true, let Nlview reserve space such that the whole wire label can be displayed. Otherwise, the label might be shortened to save space, and the complete label is only shown when hovering over the wire.

          false

        • ReadonlywireBot: boolean

          If true, the value of the attribute whose name is given in CoreConfig.wireBotAttr is shown as a wire label (typically below the wire).

          false

        • ReadonlywireBotAttr: null | string

          If CoreConfig.wireBot is true, the value of the wire attribute whose name is given here is shown as a label (typically below the wire).

          "Diameter"

        • ReadonlywireBotFmt: string

          Formatting information (foreground/background color) for displaying the additional wire attribute (see CoreConfig.wireBot and CoreConfig.wireBotAttr). It must be empty or one color (defining the background color of the displayed attribute value) or two colors separated by a space (defining the background and foreground colors of the displayed attribute value).

          For example wireBotFmt = "#ffd080 #000000" displays the attribute value black on beige background.

          "" (empty string)

        • ReadonlywireMark: boolean

          If true, EEvision displays a small color marker on the wire that shows the color of the wire's cover.

          true

        • ReadonlywireTop: boolean

          Switch between showing the wire name or an arbitrary wire attribute above the wire. If false, the wire name is shown; if true, the value of the attribute whose name is given as the value of CoreConfig.wireTopAttr is displayed.

          false

        • ReadonlywireTopAttr: null | string

          Name of the wire attribute whose value should be shown above the wire (instead of the wire name) if CoreConfig.wireTop is true.

          "Signal"

      • Readonlyextern: any

        All remaining entries, e.g., from plugins or the GUI.

      • ReadonlygrayMode: boolean

        GrayMode active or not

      • ReadonlyhighlightObjects: readonly (
            | readonly (readonly (number | ObjectID)[])[]
            | readonly (undefined | string)[]
            | readonly (readonly (null | number | ObjectID)[])[]
        )[]

        The highlighted objects mapped to their highlight slot (number between HIGHLIGHT_MIN_SLOT and HIGHLIGHT_MAX_SLOT).

      • ReadonlyhistoryCount: number

        Position in the history stack

      • Readonlylast_selection: null | string

        The most recently clicked object

      • Readonlymtime: null | string

        The EDB modification time.

      • ReadonlynetMode: boolean

        NetMode active or not

      • Readonlyschematic: null | string

        The currently loaded Nlview schematic

      • Readonlyselection: null | string

        The current selection in Nlview

      • Optional Readonlytitle?: string

        The page title

      • Optional Readonlyurl?: string

        When exporting an history state via the EEvision API, we add the URL. When loading the history state, this avoids the problem that loaded EDB and history state do not match.

      • Readonlyviewport: null | string

        The currently visible part of the schematic

    Returns Promise<void>

    When restoring a state, the same URL needs to be loaded, i.e., the same database with the same options for 100% filtering, attribute filtering etc.

Initialization and Destruction

  • Initialize the EEvision instance.

    Parameters

    • params:
          | string
          | {
              edb?: string;
              f?: null
              | readonly ObjectID[];
              famo?: number;
              fattr?: null | string;
              fblock?: null | readonly string[];
              ff?: null | readonly string[];
              fsig?: null | string;
              fsigf?: null | readonly string[];
              fv?: null | readonly string[];
              fwt?: null | readonly string[];
              home?: null | string;
              plink?: null | string;
              tool?: null | string | readonly string[];
          }

      The URL parameters that should be used for initializing the EEvision database. For the available parameters, see URLParameters.

      • string
      • {
            edb?: string;
            f?: null | readonly ObjectID[];
            famo?: number;
            fattr?: null | string;
            fblock?: null | readonly string[];
            ff?: null | readonly string[];
            fsig?: null | string;
            fsigf?: null | readonly string[];
            fv?: null | readonly string[];
            fwt?: null | readonly string[];
            home?: null | string;
            plink?: null | string;
            tool?: null | string | readonly string[];
        }
        • Optional Readonlyedb?: string

          Name of the EDB file to load. The filename must be relative to the web server's dataRoot.

        • Optional Readonlyf?: null | readonly ObjectID[]

          Module IDs for filtering EDB data to 100% model.

        • Optional Readonlyfamo?: number

          Filter attributes mode.

          Different attribute modes are no longer supported. The default mode supports a default language in case no translation of the target language is available (equivalent to famo=2).

        • Optional Readonlyfattr?: null | string

          Enables the "filter attributes" post-process by specifying the suffix to attribute names.

        • Optional Readonlyfblock?: null | readonly string[]

          Enables the filter-block post-process; additional flags can be specified.

        • Optional Readonlyff?: null | readonly string[]

          Flags for filtering EDB data to a 100% model.

        • Optional Readonlyfsig?: null | string

          Enables the filter-by-signal post-process. Optionally an attribute name can be specified that has the signal name as its value. If no signal name should be used, set the parameter to the empty string.

        • Optional Readonlyfsigf?: null | readonly string[]

          Flags for the filter-by-signal process.

        • Optional Readonlyfv?: null | readonly string[]

          Activated/set variables for filtering EDB data to a 100% model.

        • Optional Readonlyfwt?: null | readonly string[]

          Enables the filter-wire-types post-process by listing the types of wires that should be preserved.

        • Optional Readonlyhome?: null | string

          Link that is opened when the user clicks on the "Home" button.

        • Optional Readonlyplink?: null | string

          Permalink to a stored EEvision state.

        • Optional Readonlytool?: null | string | readonly string[]

          Available license features: "pro", "signoff", "edbdiff", "docgen". "basic" licensing is always available.

    Returns Promise<void>

    Initialization must be finished before any other API calls are allowed. The only exception is setting event handlers (e.g., EEvisionAPI.onError etc.). In order to catch errors that occur during initialization, it is necessary to install the handlers before calling EEvisionAPI.Init.

  • Terminate the EEvision instance and check in its license.

    Typically, the lifetime of EEvision is bound to the browser tab. EEvision is terminated and the license checked in when the browser tab is closed. For this to work, EEvision relies on the browser to emit the event beforeunload when the tab is closed.

    If the lifetime of EEvision is shorter than that of the browser tab, this function should be called once to terminate EEvision.

    Returns Promise<void>

Operation Modes

  • get PDFStatus(): PDFStatus
  • Return the current status of the pdfkit library that can be used to create PDF files from EEvision. To load the library, use the function PluginAPI.LoadPDFLib.

    Returns PDFStatus

  • De-activate the endcircuit extension.

    Returns Promise<void>

    This extension requires an EEvision PRO license. If such a license is not available, the function throws an Error exception.

  • Temporarily disable the handlers for selections, viewport changes, and page changes. This is sometimes required to avoid infinite calls to event handlers, e.g., when the selection handler needs to change the current selection.

    Returns Promise<void>

    • This function must only called once before the handlers are re-enabled again using EEvisionAPI.EnableNotify.
    • The handlers must be re-enabled as soon as possible using EEvisionAPI.EnableNotify. Forgetting to do so will have strange effects on EEvision.
  • Activate the endcircuit extension.

    Returns Promise<void>

    This extension requires an EEvision PRO license. If such a license is not available, the function throws an Error exception.

  • Return EEvision's schematicMode. EEvision can automatically create different kinds of abstractions from a harness model:

    • The default view is the physical mode that contains all inliners, splices etc.
    • The logical mode merges all electrically connected wires into a logical net.
    • The block mode only shows which devices are connected with each other.
    • Finally, the wire filter mode omits all wires of a certain type (e.g., all ground wires) from the schematic.

    Returns Promise<SchematicMode>

    the schematicMode of EEvision.

  • Return whether EEvision's grayMode is active or not.

    EEvision's grayMode removes all colors from the schematic except the highlighting colors (see EEvisionAPI.Highlight / EEvisionAPI.Unhighlight). This mode can be convenient to make the highlighting better visible, e.g., when the components or wires are colored themselves.

    Returns Promise<boolean>

    true if grayMode is active; otherwise false.

  • Return whether EEvision's netMode is enabled or not.

    For instance, in netMode, clicking on a wire automatically selects all wires that are electrically connected with the clicked wire. Similarly, EEvisionAPI.LoadObj loads not only the requested wire, but additionally all other wires that are electrically connected with it (via splices, inline connectors, etc.).

    Returns Promise<boolean>

    true if netMode is enabled in EEvision.

  • Load the pdfkit library from the server. This library allows the user to export PDF files from EEvision.

    Returns Promise<PDFStatus>

    the status of the PDF library after trying to load it.

    Calling this function multiple times does not hurt. The library is only loaded when it is not yet available.

  • Toggle, activate or de-activate EEvision's grayMode.

    Parameters

    • Optionalon: boolean

      if true activate the grayMode; otherwise de-activate it. If on is not specified, switch the grayMode.

    Returns Promise<boolean>

    true if the grayMode is active after the call.

  • Toggle, activate, or de-activate EEvision's netMode.

    Parameters

    • Optionalon: boolean

      if true, enable netMode; otherwise disable it. If the parameter is missing, then the current netMode status is changed.

    Returns Promise<boolean>

    true if the netMode is active after the call.