• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

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

Participant ,
Apr 21, 2017 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

404

Translate

Translate

Report

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

correct answers 1 Correct answer

Community Expert , Apr 23, 2017 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.

Votes

Translate

Translate
Advocate ,
Apr 21, 2017 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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Apr 23, 2017 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!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 23, 2017 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.

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

LATEST

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

Votes

Translate

Translate

Report

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