Jump to content
Developer Wiki and Function Reference Links ×

Setting Layer Visibility in DLVPs


Recommended Posts

Hi all,

I need a quick way to set various layer visibilities in a file containing 160 referenced Design Layer Viewports.

I tried using SetVPLayerVisibility(), however it did not seem to work as advertised (it does nothing). I am wondering if that's because I can't get a handle to a layer inside a DLVP (since it's encapsulated in the DLVP and doesn't appear in the file's main layer list).

So I tried adding the layers that are encapsulated inside the DLVPs to the main file layer list. The SetVPLayerVisibility() routine now reports TRUE but no changes are affected.

Anyone have any success doing this?

Link to comment

result:= SetVPLayerVisibility(vpHdl,layHdl,0); {will make the layer visible and}

result:= SetVPLayerVisibility(vpHdl,layHdl,-1); will make it invisible.

Is the DLVP still referencing the external file layers or the main document layers?

To get the layer handles I set up a loop starting with FLayer.

curLay:= FLayer;

WHILE curLay <> NIL DO

BEGIN

......

......

curLay:= NextLayer(curLay);

END;

Link to comment
  • 2 weeks later...

Thanks Miguel,

Not working at all for me. The DLVPs are referenced from an external source and as such, the layers do not appear in the main document layer list. This may be the problem. I am thinking that SetVPLayerVisibility() was intended to work with Sheet Layer Viewports only.

V-G

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...