Skip to main content
Multoman
Inspiring
Feb 9, 2023 6:40 AM UTC
Answered

Define the path in the library using jsfl

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 is closed to new replies. Start a new post to keep the conversation going.
JoãoCésar17023019
JoãoCésar17023019Correct answer
Community Expert
Feb 9, 2023 10:01 AM UTC

Hi.

 

Try this:

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

 

Regards,

JC

3 replies

JoãoCésar17023019
Community Expert
JoãoCésar17023019Community ExpertCorrect answer
Community Expert
Feb 9, 2023 10:01 AM UTC

Hi.

 

Try this:

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

 

Regards,

JC

Translate
Multoman
MultomanAuthor
Inspiring
Feb 9, 2023 10:21 AM UTC

Thank You

Translate
JoãoCésar17023019
Community Expert
Community Expert
Feb 9, 2023 10:26 AM UTC

You're welcome.

Translate