Skip to main content
Multoman
Inspiring
February 9, 2023
Answered

Define the path in the library using jsfl

  • February 9, 2023
  • 1 reply
  • 472 views

I have a dedicated object. How do I get its path and name in the library if the selected object is located in several folders in the library? I searched in the documentation but didn't find anything, maybe I just didn't notice the desired object

I was thinking something like this:

	fl.trace(fl.getDocumentDOM().selection[0].pathInLibrary) /*The output should be: 'LOGO/qwerTTT/asd'*/

 

This topic has been closed for replies.
Correct answer JoãoCésar17023019

Hi.

 

Try this:

fl.trace(fl.getDocumentDOM().selection[0].libraryItem.name);

 

Regards,

JC

1 reply

JoãoCésar17023019
Community Expert
JoãoCésar17023019Community ExpertCorrect answer
Community Expert
February 9, 2023

Hi.

 

Try this:

fl.trace(fl.getDocumentDOM().selection[0].libraryItem.name);

 

Regards,

JC

Multoman
MultomanAuthor
Inspiring
February 9, 2023

Thank You

JoãoCésar17023019
Community Expert
Community Expert
February 9, 2023

You're welcome.