Check if panel exists before opening

Discussions about product bugs & problems!
Note: This is no replacement for the Official ETM Support!
7 posts • Page 1 of 1
WINOA
Posts:15
Joined: Mon Apr 09, 2018 3:24 pm

Check if panel exists before opening

Post by WINOA »

Hello All,

I need to know if a panel exist before I open it. I use getPath and isfile to gather the location and check the existance of it.

Problem comes when using Desktop UI app (3.15.10). The path given is the cache folder (C:\\Users\\user\\.wincc_oa-cache) and the file does not exists.

Is there a way of checking if the panel exists directly in the server?

I am using 3.15 P010 version

Thank you in advance

leoknipp
Posts:2928
Joined: Tue Aug 24, 2010 7:28 pm

Re: Check if panel exists before opening

Post by leoknipp »

When calling the function getPath() in a Desktop-UI the file will be loaded from the server to the cache directory at the client, if the file exists at the server.

Best Regards
Leopold Knipp
Senior Support Specialist

WINOA
Posts:15
Joined: Mon Apr 09, 2018 3:24 pm

Re: Check if panel exists before opening

Post by WINOA »

Hello, In my case not all of the panels are loaded.

When I use (getPath(PANELS_REL_PATH, "")) it I see it points to the cash but they dont exist.

I do have the keep in memory property set up to FALSE and it is required. Is there any other method?

Thanks for your help

leoknipp
Posts:2928
Joined: Tue Aug 24, 2010 7:28 pm

Re: Check if panel exists before opening

Post by leoknipp »

In your example you have not defined a filename.
The file is only copied to the server if a filename is defined.

Best Regards
Leopold Knipp
Senior Support Specialist

WINOA
Posts:15
Joined: Mon Apr 09, 2018 3:24 pm

Re: Check if panel exists before opening

Post by WINOA »

Hello, I have defined the panel name (From /panels downstream) fo the getPath function also and it points to the cashfolder in the desktop ui.

Any idea?

Thanks

leoknipp
Posts:2928
Joined: Tue Aug 24, 2010 7:28 pm

Re: Check if panel exists before opening

Post by leoknipp »

The function getPath() will always refer to the cache directory as the client does not know the path information at the server and all files are stored in the local cache.

Best Regards
Leopold Knipp
Senior Support Specialist

WINOA
Posts:15
Joined: Mon Apr 09, 2018 3:24 pm

Re: Check if panel exists before opening

Post by WINOA »

Thank you, regards

7 posts • Page 1 of 1