Function equivalent to "Break Link" in the Edit-->Links dialog box

Participant ,
Apr 21, 2017

Copy link to clipboard

Copied

Hello fellows,

I wonder if there is an API (in framescript/extendscript) for breaking a link to an imported inset file (Excel sheet, Visio, etc).

Thanks,

Roman

TOPICS
Scripting

Views

275

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

1 Correct Answer

Adobe Community Professional , Apr 23, 2017
frameexpert Adobe Community Professional , Apr 23, 2017
This won't work for OLE (linked) objects. The InsetFile property for these is always an empty string. These kinds of links are not exposed to the FDK, ExtendScript, or FrameScript. As far as I know, there is no way to break this kind of link programmatically.

Likes

Translate

Translate
Jump to answer Jump to answer
Advocate ,
Apr 21, 2017

Copy link to clipboard

Copied

Hi Roman,

With a simple script you can find the inset to be unlinked and set its InsetFile property to an empty string. That should do the trick, I think.

Ciao

Jang

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
rombanks AUTHOR
Participant ,
Apr 23, 2017

Copy link to clipboard

Copied

Hi Jang,

I appreciate your input! No wonder I didn't find any function related to that. Following your suggestion, I came up with the following code.

The problem is that for a reason that is unclear to me, I can't retrieve the InsetFile path using alert() and can't make it null. The alert dialog box that pops up contains no value. What am I missing?  

var doc= app.ActiveDoc; 

DisconnectGraphics(doc); 

 

function DisconnectGraphics(doc) 

          

   var graph = doc.FirstGraphicInDoc; 

       while (graph.ObjectValid()) { 

       

            if ( graph.type == Constants.FO_Inset ) { 

               alert(graph.InsetFile);

               graph.InsetFile = "";

                                                              

               } 

         graph = graph.NextGraphicInDoc;   

  } 

    

Thanks!

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Adobe Community Professional ,
Apr 23, 2017

Copy link to clipboard

Copied

This won't work for OLE (linked) objects. The InsetFile property for these is always an empty string. These kinds of links are not exposed to the FDK, ExtendScript, or FrameScript. As far as I know, there is no way to break this kind of link programmatically.

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
rombanks AUTHOR LATEST
Participant ,
Apr 23, 2017

Copy link to clipboard

Copied

Hi Rick,

Thank you for your response!

I was afraid that Adobe didn't cover the OLE2 use case...

I'll check if this can be done with AutoIt.

Best Wishes,

Roman

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more