• Industries
  • Products
  • Buy
  • Services & Support
  • Communities
  • Discussion Groups

    Autodesk DWF Viewer

    Reply
    *Savås, Per

    Layers on/off. Why so slow?

    111 Views, 6 Replies
    01-26-2003 04:36 AM
    for each layer in AdView.Viewer.Layers
    layer.visible=false
    next

    The above loop takes approx. 2 sec/100 layers in a VB-script, which I think
    is too slow.
    (Athlon XP1800+, 1.53 GHz)
    Is it possible to speed it up in any way?

    Regards

    Per Savås
    Please use plain text.
    *Sheppard, Scott

    Re: Layers on/off. Why so slow?

    01-27-2003 12:25 AM in reply to: *Savås, Per
    The WHIP! API allowed a calling program to specify a set of layers to turn
    on or off, and WHIP! would turn them on or off in one fell swoop. The Volo
    View Express API allowed the caller to turn layers on or off one layer at a
    time. A Volo View Express newsgroup user pointed out the slowness of Volo
    View Express in this regard. The rejoinder was that the Volo View Express
    layer dialog could be resized. It reminded me of the "Dead Parrot Skit" from
    Monty Python where I equated the resizability to beautiful plumage. If
    history is any indication, I think the AEV API slowness in this regard is
    that layers are processed one layer at a time.

    "Per Savås" wrote in message
    news:F5AAA03A20F3F192A75B24DC144A0BB6@in.WebX.maYIadrTaRb...
    > for each layer in AdView.Viewer.Layers
    > layer.visible=false
    > next
    >
    > The above loop takes approx. 2 sec/100 layers in a VB-script, which I
    think
    > is too slow.
    > (Athlon XP1800+, 1.53 GHz)
    > Is it possible to speed it up in any way?
    >
    > Regards
    >
    > Per Savås
    >
    >
    Please use plain text.
    *Vigfusson, Allan

    Re:

    01-28-2003 12:42 AM in reply to: *Savås, Per
    We seen this slowness as well via VB when turning off and on layers. We
    worked around the problem by using the zoombyfactor to zoom in a huge
    percentage, turn off and on required layers, then zoom out the same
    percentage to the starting point. It seems to be a video thing going on
    when turning on and off the layers. When you are zoomed in 3000% and
    nothing is visible on the display the layer changes happen instantly


    "Scott Sheppard" wrote in message
    news:AE61F9F9B6F6D75CBDF1CDE0895AC6B1@in.WebX.maYIadrTaRb...
    > The WHIP! API allowed a calling program to specify a set of layers to turn
    > on or off, and WHIP! would turn them on or off in one fell swoop. The Volo
    > View Express API allowed the caller to turn layers on or off one layer at
    a
    > time. A Volo View Express newsgroup user pointed out the slowness of Volo
    > View Express in this regard. The rejoinder was that the Volo View Express
    > layer dialog could be resized. It reminded me of the "Dead Parrot Skit"
    from
    > Monty Python where I equated the resizability to beautiful plumage. If
    > history is any indication, I think the AEV API slowness in this regard is
    > that layers are processed one layer at a time.
    >
    > "Per Savås" wrote in message
    > news:F5AAA03A20F3F192A75B24DC144A0BB6@in.WebX.maYIadrTaRb...
    > > for each layer in AdView.Viewer.Layers
    > > layer.visible=false
    > > next
    > >
    > > The above loop takes approx. 2 sec/100 layers in a VB-script, which I
    > think
    > > is too slow.
    > > (Athlon XP1800+, 1.53 GHz)
    > > Is it possible to speed it up in any way?
    > >
    > > Regards
    > >
    > > Per Savås
    > >
    > >
    >
    >
    Please use plain text.
    *Klug, Jeffrey

    Re:

    02-03-2003 02:11 AM in reply to: *Savås, Per
    You can use a couple of hidden API methods for turning on and off a group
    of layers all at once (performs one window invalidation at the end of the
    call):

    _layersOn(BSTR listOfLayers)
    _layersOff(BSTR listOfLayers)

    In your listOfLayers, you need to comma-delimit your layer names. If you
    have layer names that contain commas, you need to html-encode those commas,
    (i.e. use %27).

    Hope that helps.

    Jeffrey Klug
    Autodesk, Inc.



    "Allan Vigfusson" wrote in message
    news:37FC21F20765B91686356D7F167DE599@in.WebX.maYIadrTaRb...
    > We seen this slowness as well via VB when turning off and on layers. We
    > worked around the problem by using the zoombyfactor to zoom in a huge
    > percentage, turn off and on required layers, then zoom out the same
    > percentage to the starting point. It seems to be a video thing going on
    > when turning on and off the layers. When you are zoomed in 3000% and
    > nothing is visible on the display the layer changes happen instantly
    >
    >
    > "Scott Sheppard" wrote in message
    > news:AE61F9F9B6F6D75CBDF1CDE0895AC6B1@in.WebX.maYIadrTaRb...
    > > The WHIP! API allowed a calling program to specify a set of layers to
    turn
    > > on or off, and WHIP! would turn them on or off in one fell swoop. The
    Volo
    > > View Express API allowed the caller to turn layers on or off one layer
    at
    > a
    > > time. A Volo View Express newsgroup user pointed out the slowness of
    Volo
    > > View Express in this regard. The rejoinder was that the Volo View
    Express
    > > layer dialog could be resized. It reminded me of the "Dead Parrot Skit"
    > from
    > > Monty Python where I equated the resizability to beautiful plumage. If
    > > history is any indication, I think the AEV API slowness in this regard
    is
    > > that layers are processed one layer at a time.
    > >
    > > "Per Savås" wrote in message
    > > news:F5AAA03A20F3F192A75B24DC144A0BB6@in.WebX.maYIadrTaRb...
    > > > for each layer in AdView.Viewer.Layers
    > > > layer.visible=false
    > > > next
    > > >
    > > > The above loop takes approx. 2 sec/100 layers in a VB-script, which I
    > > think
    > > > is too slow.
    > > > (Athlon XP1800+, 1.53 GHz)
    > > > Is it possible to speed it up in any way?
    > > >
    > > > Regards
    > > >
    > > > Per Savås
    > > >
    > > >
    > >
    > >
    >
    >
    Please use plain text.
    *Porter, Michael

    Re:

    02-03-2003 10:00 PM in reply to: *Savås, Per
    This is _very_ encouraging! Anything more up your sleeve??? I am
    especially interested in a replacement for hte ComputeCoordinates
    method in Whip.

    Michael




    "Jeffrey Klug" wrote:

    >You can use a couple of hidden API methods for turning on and off a group
    >of layers all at once (performs one window invalidation at the end of the
    >call):
    >
    >_layersOn(BSTR listOfLayers)
    >_layersOff(BSTR listOfLayers)
    >
    >In your listOfLayers, you need to comma-delimit your layer names. If you
    >have layer names that contain commas, you need to html-encode those commas,
    >(i.e. use %27).
    >
    >Hope that helps.
    >
    >Jeffrey Klug
    >Autodesk, Inc.
    >
    >

    Michael Porter Naval Architect / Boatbuilder
    mporter at mp-marine.com
    www.mp-marine.com
    Cartography: www.cba-inst.org
    Please use plain text.
    *Lone, Peter

    Re:

    02-05-2003 04:33 AM in reply to: *Savås, Per
    Jeffrey:

    Are these API calls used like this?
    AdView.Viewer._layersOn(strMyLayerOnList);
    AdView.Viewer._layersOff(strMyLayerOffList);

    If not, what are the methods attached to?

    TIA,

    :smileytongue:

    "Jeffrey Klug" wrote in message
    news:6ECBCCBCEBEC8A5BBCAF47B7F97B7493@in.WebX.maYIadrTaRb...
    > You can use a couple of hidden API methods for turning on and off a group
    > of layers all at once (performs one window invalidation at the end of the
    > call):
    >
    > _layersOn(BSTR listOfLayers)
    > _layersOff(BSTR listOfLayers)
    >
    > In your listOfLayers, you need to comma-delimit your layer names. If you
    > have layer names that contain commas, you need to html-encode those
    commas,
    > (i.e. use %27).
    >
    > Hope that helps.
    >
    > Jeffrey Klug
    > Autodesk, Inc.
    >
    >
    >
    > "Allan Vigfusson" wrote in message
    > news:37FC21F20765B91686356D7F167DE599@in.WebX.maYIadrTaRb...
    > > We seen this slowness as well via VB when turning off and on layers. We
    > > worked around the problem by using the zoombyfactor to zoom in a huge
    > > percentage, turn off and on required layers, then zoom out the same
    > > percentage to the starting point. It seems to be a video thing going on
    > > when turning on and off the layers. When you are zoomed in 3000% and
    > > nothing is visible on the display the layer changes happen instantly
    > >
    > >
    > > "Scott Sheppard" wrote in message
    > > news:AE61F9F9B6F6D75CBDF1CDE0895AC6B1@in.WebX.maYIadrTaRb...
    > > > The WHIP! API allowed a calling program to specify a set of layers to
    > turn
    > > > on or off, and WHIP! would turn them on or off in one fell swoop. The
    > Volo
    > > > View Express API allowed the caller to turn layers on or off one layer
    > at
    > > a
    > > > time. A Volo View Express newsgroup user pointed out the slowness of
    > Volo
    > > > View Express in this regard. The rejoinder was that the Volo View
    > Express
    > > > layer dialog could be resized. It reminded me of the "Dead Parrot
    Skit"
    > > from
    > > > Monty Python where I equated the resizability to beautiful plumage. If
    > > > history is any indication, I think the AEV API slowness in this regard
    > is
    > > > that layers are processed one layer at a time.
    > > >
    > > > "Per Savås" wrote in message
    > > > news:F5AAA03A20F3F192A75B24DC144A0BB6@in.WebX.maYIadrTaRb...
    > > > > for each layer in AdView.Viewer.Layers
    > > > > layer.visible=false
    > > > > next
    > > > >
    > > > > The above loop takes approx. 2 sec/100 layers in a VB-script, which
    I
    > > > think
    > > > > is too slow.
    > > > > (Athlon XP1800+, 1.53 GHz)
    > > > > Is it possible to speed it up in any way?
    > > > >
    > > > > Regards
    > > > >
    > > > > Per Savås
    > > > >
    > > > >
    > > >
    > > >
    > >
    > >
    >
    >
    Please use plain text.
    *Cochran, Ben

    Re:

    02-05-2003 07:55 AM in reply to: *Savås, Per
    These are hidden parameters and they are available from VB, but they are not
    available from VB Script.



    _LayersOn and _LayersOff are parameters, so the correct syntax is.

    _LayersOn = "Layer1,Layer2"

    _LayersOff = "Layer3,Layer4"



    If you want to load a web page with more then one layer turned off at load
    time I would use the ViewerParams.






    "Peter Lone" wrote in message
    news:BC690F309416B13283F018F41E0F4764@in.WebX.maYIadrTaRb...
    > Jeffrey:
    >
    > Are these API calls used like this?
    > AdView.Viewer._layersOn(strMyLayerOnList);
    > AdView.Viewer._layersOff(strMyLayerOffList);
    >
    > If not, what are the methods attached to?
    >
    > TIA,
    >
    > :smileytongue:
    >
    > "Jeffrey Klug" wrote in message
    > news:6ECBCCBCEBEC8A5BBCAF47B7F97B7493@in.WebX.maYIadrTaRb...
    > > You can use a couple of hidden API methods for turning on and off a
    group
    > > of layers all at once (performs one window invalidation at the end of
    the
    > > call):
    > >
    > > _layersOn(BSTR listOfLayers)
    > > _layersOff(BSTR listOfLayers)
    > >
    > > In your listOfLayers, you need to comma-delimit your layer names. If
    you
    > > have layer names that contain commas, you need to html-encode those
    > commas,
    > > (i.e. use %27).
    > >
    > > Hope that helps.
    > >
    > > Jeffrey Klug
    > > Autodesk, Inc.
    > >
    > >
    > >
    > > "Allan Vigfusson" wrote in message
    > > news:37FC21F20765B91686356D7F167DE599@in.WebX.maYIadrTaRb...
    > > > We seen this slowness as well via VB when turning off and on layers.
    We
    > > > worked around the problem by using the zoombyfactor to zoom in a huge
    > > > percentage, turn off and on required layers, then zoom out the same
    > > > percentage to the starting point. It seems to be a video thing going
    on
    > > > when turning on and off the layers. When you are zoomed in 3000% and
    > > > nothing is visible on the display the layer changes happen instantly
    > > >
    > > >
    > > > "Scott Sheppard" wrote in message
    > > > news:AE61F9F9B6F6D75CBDF1CDE0895AC6B1@in.WebX.maYIadrTaRb...
    > > > > The WHIP! API allowed a calling program to specify a set of layers
    to
    > > turn
    > > > > on or off, and WHIP! would turn them on or off in one fell swoop.
    The
    > > Volo
    > > > > View Express API allowed the caller to turn layers on or off one
    layer
    > > at
    > > > a
    > > > > time. A Volo View Express newsgroup user pointed out the slowness of
    > > Volo
    > > > > View Express in this regard. The rejoinder was that the Volo View
    > > Express
    > > > > layer dialog could be resized. It reminded me of the "Dead Parrot
    > Skit"
    > > > from
    > > > > Monty Python where I equated the resizability to beautiful plumage.
    If
    > > > > history is any indication, I think the AEV API slowness in this
    regard
    > > is
    > > > > that layers are processed one layer at a time.
    > > > >
    > > > > "Per Savås" wrote in message
    > > > > news:F5AAA03A20F3F192A75B24DC144A0BB6@in.WebX.maYIadrTaRb...
    > > > > > for each layer in AdView.Viewer.Layers
    > > > > > layer.visible=false
    > > > > > next
    > > > > >
    > > > > > The above loop takes approx. 2 sec/100 layers in a VB-script,
    which
    > I
    > > > > think
    > > > > > is too slow.
    > > > > > (Athlon XP1800+, 1.53 GHz)
    > > > > > Is it possible to speed it up in any way?
    > > > > >
    > > > > > Regards
    > > > > >
    > > > > > Per Savås
    > > > > >
    > > > > >
    > > > >
    > > > >
    > > >
    > > >
    > >
    > >
    >
    >
    Please use plain text.