Skip to main content
Olivier Beltrami
Legend
June 2, 2023
Question

Determine if Frame is visible from its UIDRef

  • June 2, 2023
  • 2 replies
  • 153 views

Hello,

In our plugin we determine if a given frame is located on an invisible layer, and this works fine. However, I have not been able to find a way to determine if a frame is visible from its UIDRef. Any suggestions ?

Very best regards,

Olivier

This topic has been closed for replies.

2 replies

Inspiring
July 19, 2023

Hi @Olivier Beltrami ,

 

You may try using -

 

Utils<Facade::IPageItemVisibilityFacade>()->IsHidden(frameRef);

 

But I suppose, this will only return true if frame is made to hidden from the menu and iirespective it is on hidden layer or not.

 

If this does not work then only way to find whether frame is hidded based on hidden layer is by find the layer on which the frame belongs and checking the layer state.

 

Regards,

Rahul Rastogi

Adobe InDesign C++ Plugins Developer

iZine Solutions

Community Expert
July 19, 2023

I'm not entirely convinced I'm the best to reply  here as my experience is very limited
But hey - why not give it a go and see if I learn something too

var myPageItem = myUIDRef.asPageItem();

var isVisible = myPageItem.visible;

if (!isVisible) {
  var myLayer = myPageItem.itemLayer;

  isVisible = myLayer.visible;
}