ImageGear .NET v25.2 - Updated
ImageGear.Web.Isis Library / ImageGear.Web.Isis Namespace / ImGearIsisScanner class / getTag Method

In This Topic
    getTag Method
    In This Topic
    Gets the current value of an ISIS tag.
    Syntax
    ASP.NET Ajax JavaScript (Specification) 
    function getTag( 
       tagID : number(Integer),
       index : number(Integer),
       callback : function
    ) : ImGearIsisOperationStatus;
    ASP.NET Ajax JavaScript (Usage) 
    var resultVar = instanceOfImGearIsisScanner.getTag(number(Integer),number(Integer),function);

    Parameters

    tagID
    The ID of the tag.
    index
    The index to use, for tags that contain multiple values. If the tag contains only a single value, this must be 0.
    callback
    Callback which is called when the tag is retrieved.

    Return Value

    Example

    The JavaScript code below demonstrates how to get a scanner ISIS tag, where pageSizeSelect is an HTML select element:

    function getTagCallback(tagID, tagType, choices, tagValue, status) {
        if (status.get_status() !== ImageGear.Web.Isis.ImGearIsisStatus.Completed) {
            alert(status.get_statusMessage());
        }
    
        var pageSizeSelect = document.getElementById("pageSizeSelect");
        // The page sizes are provided as strings. The choices argument contains properties for getting the list of strings, integers, or numerators and
        // denominators or the minimum, maximum, and step values for a range of integers or numerators and denominators. The tagValue argument contains
        // properties for getting the current string value, integer value, or numerator and denominator values. You can check the tagType argument to
        // determine if the tag values are string, integer, or rational. You can check the choiceKind property of the choices argument to determine if
        // the tag values are provided as a range or in a list.
        var stringList = choices.get_stringList();
        for (var i = 0; i < stringList.get_length(); i++) {
            var tagString = stringList.getTagString(i);
            var option = document.createElement("option");
            option.text = tagString;
            pageSizeSelect.add(option, null);
        }
    }
    
    scannerSession.get_scanner().getTag(ImageGear.Web.Isis.ImGearIsisTag.PageSize, 0, getTagCallback);
    Remarks

    This is an asynchronous method.

    The scanner must be set before calling this method.

    For more information on ISIS tags, refer to the ISIS Tags topic.

    See Also