GET FILE NAME FROM PB

Christie Widget Designer Version 6 - Q&A

Moderator: Moderator Group

Forum rules
When asking make sure to include the operating system and the revision of Widget Designer you are using.

GET FILE NAME FROM PB

Postby satanete666 » Mon May 01, 2017 7:06 pm

Hi ,

I would like to know if is possibe to get from pandoras box the file names of each folder in your proyect, because we need to make a media control with labels in one proyect.

thanks in advance.
satanete666
 
Posts: 103
Joined: Fri May 20, 2011 5:20 pm

Re: GET FILE NAME FROM PB

Postby Benni_M » Mon May 01, 2017 11:17 pm

If you have folder and file Id's you can read the names of the files.

Cheers,
Benni
Benni_M
 
Posts: 96
Joined: Thu Apr 12, 2012 3:45 pm

Re: GET FILE NAME FROM PB

Postby satanete666 » Sat May 06, 2017 12:45 am

Can you give me the command or node to do that?

thanks in advance
satanete666
 
Posts: 103
Joined: Fri May 20, 2011 5:20 pm

Re: GET FILE NAME FROM PB

Postby Dennis Kuypers » Sat May 06, 2017 2:37 pm

Hello,

I added scripts for that to WD V6 recently. It's not in the 5002 RC, but it will be in the next release.

Regards
Dennis
Dennis Kuypers
Product Developer, Software

Online Manual
User avatar
Dennis Kuypers
coolux Germany
 
Posts: 705
Joined: Thu Jul 05, 2012 12:18 pm

Re: GET FILE NAME FROM PB

Postby Benni_M » Sat May 06, 2017 4:53 pm

Create a Grafik layer.
Set mute rendering.
In wd:
For 1 to 99
DeviceSetMedia,SiteID,DeviceID,FolderID,for.index
VGetDeviceMediaName,VarName,SiteID,DeviceID
Next

Cheers,
Benni
Benni_M
 
Posts: 96
Joined: Thu Apr 12, 2012 3:45 pm

Re: GET FILE NAME FROM PB

Postby malkuth23 » Sat May 06, 2017 8:52 pm

Clever solution.
Matthew Newman-Saul
Theatrical Concepts
mattns@theatrical.com
User avatar
malkuth23
 
Posts: 320
Joined: Tue Apr 20, 2010 7:14 pm
Location: Ventura, CA

Re: GET FILE NAME FROM PB

Postby jaykoller » Tue Aug 22, 2017 10:34 pm

Denis is the above mention script now in 6322?

Can you expand on it?
jaykoller
 
Posts: 30
Joined: Wed Apr 02, 2014 9:42 pm
Location: Albuquerque, New Mexico, USA

Re: GET FILE NAME FROM PB

Postby Dennis Kuypers » Wed Aug 23, 2017 9:06 pm

Hello,

In revision 6036 we added the following scripts:

VGetAssetMediaProjectFileNameByID
VGetAssetMediaFileNameByID
VGetAssetMediaProjectFolderByID

Is this sufficient?

Regards
Dennis
Dennis Kuypers
Product Developer, Software

Online Manual
User avatar
Dennis Kuypers
coolux Germany
 
Posts: 705
Joined: Thu Jul 05, 2012 12:18 pm

Re: GET FILE NAME FROM PB

Postby jaykoller » Thu Aug 24, 2017 8:33 pm

Thanks. I will try them out.
jaykoller
 
Posts: 30
Joined: Wed Apr 02, 2014 9:42 pm
Location: Albuquerque, New Mexico, USA

Re: GET FILE NAME FROM PB

Postby jaykoller » Thu Aug 24, 2017 11:24 pm

Forgive my ignorance on this Dennis. I can't seem to get this to work. Do I have to create a variable? I was able to find the command but can not get it to output to anything so I can actually see the name. When I open the variable table in WD I don't see this as one of the options.

Thanks

Jay
jaykoller
 
Posts: 30
Joined: Wed Apr 02, 2014 9:42 pm
Location: Albuquerque, New Mexico, USA

Re: GET FILE NAME FROM PB

Postby Justyn Roy » Fri Aug 25, 2017 3:25 am

Yes, create a variable.

Try this script:

Code: Select all
PbProjectRefresh

Var Name = ""
Var FolderID = 1

For FileID = 1 to 10 {
   VGetAssetMediaFileNameByID("Name",FolderID,FileID)
   DebugMessage(Name)
   WDWait(0.5)
   }


The third line is the FolderID you want the names of the files.

This uses "Local Variables" instead of "Global Variables" - so these won't show up in the Variable window, but you can do most everything you need to with these ones - it's just a little less messy.

This is a bit more complicated than you might need - but I thought I'd give an example of how to get multiple names in one script - this will give you the file names from 1 to 10 in folder 1 in a Debug Window.

Let me know if you have got any questions.

Justyn
User avatar
Justyn Roy
 
Posts: 42
Joined: Tue Sep 27, 2016 1:26 am

Re: GET FILE NAME FROM PB

Postby Justyn Roy » Fri Aug 25, 2017 3:27 am

Also, are you using WD 6 or WD 4.7?
User avatar
Justyn Roy
 
Posts: 42
Joined: Tue Sep 27, 2016 1:26 am

Re: GET FILE NAME FROM PB

Postby jaykoller » Sat Aug 26, 2017 8:57 pm

Justyn Roy wrote:Also, are you using WD 6 or WD 4.7?


6. I will try this as soon as I get a chance. Thanks!

Jay
jaykoller
 
Posts: 30
Joined: Wed Apr 02, 2014 9:42 pm
Location: Albuquerque, New Mexico, USA

Re: GET FILE NAME FROM PB

Postby jaykoller » Fri Sep 01, 2017 10:38 pm

So this does work for me. I can get the file names in the debug window. However I can not output them.

I tried using a variable input node to a label output node and because it is a local variable I can not pull the values. I feel like I am missing something quite obvious.

End result I am looking for is when using a media control panel, when I click the media button, it outputs the file name to a label.

Thanks

Jay
jaykoller
 
Posts: 30
Joined: Wed Apr 02, 2014 9:42 pm
Location: Albuquerque, New Mexico, USA

Re: GET FILE NAME FROM PB

Postby jaykoller » Fri Sep 01, 2017 11:01 pm

I did find a way to do this. Please let me know if there is a better way. I established three global variables to do this. Var_Folder, Var_File and ResourceName. 4,17 is the device in this case.

I have a media device showing images on one layer. I can get the file name with the following:

PBProjectRefresh
VGetDeviceMediaFolderID("Var_Folder",4,17)
VGetDeviceMediaFileID("Var_Folder",4,17)
VGetAssetMediaFileNameByID("ResourceName",Var_Folder,Var_File)

I then use a Variable input node for ResourceName that is linked to a Label Output node.
jaykoller
 
Posts: 30
Joined: Wed Apr 02, 2014 9:42 pm
Location: Albuquerque, New Mexico, USA

Next

Return to Widget Designer V6

Who is online

Users browsing this forum: No registered users and 0 guests