🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.indesign.sdk
Article #532

CS4: importing/reimporting a graphic file into an existing pageitem

#532
From: J�rgen_Rohrbach
Date: Fri, 16 Jan 2009 06:18
29 lines
1684 bytes
Hello,

have a porting problem from cs3 to cs4. i want to import a graphic in an existing pageitem. cs2/cs3 code is the following:

InterfacePtr<ICommand> reimportCmd(CmdUtils::CreateCommand(kReimportCmdBoss));
if(!reimportCmd)
	break;

InterfacePtr<IImportFileCmdData> importFileCmdData(reimportCmd, IID_IIMPORTFILECMDDATA); // no kDefaultIID
if (importFileCmdData == nil)
	 break;

InterfacePtr<IDataLinkHelper> dataLinkHelper(::CreateObject2<IDataLinkHelper>(kDataLinkHelperBoss));
if (!dataLinkHelper)
	break;

InterfacePtr<IDataLink> dataLink(dataLinkHelper->CreateDataLink (file));
if (!dataLink)
	break;

importFileCmdData->Set(ref.GetDataBase(), dataLink, kMinimalUI, ref.GetUID());

result = CmdUtils::ProcessCommand(reimportCmd);

how can i get this work in cs4? does somebody have a code snippet? tried the kImportAndPlaceCmdBoss but when i use them there is a additional item inside the original pageitem. seems to me that there is one unexpected item in the hierarchy.

Thanks,

Juergen
Technical Details
Message-ID: <59b78747.-1@webcrossing.la2eafNXanI>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!newshub.sdsu.edu!webcrossing

Show Full Headers
Complete Article Headers
X-Google-Thread: f63e9,3b25686bcf1e22ee,start
X-Google-Attributes: gidf63e9,domainid0,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: J�rgen_Rohrbach@adobeforums.com
Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!newshub.sdsu.edu!webcrossing
Newsgroups: adobe.indesign.sdk
Subject: CS4: importing/reimporting a graphic file
 into an existing pageitem
Message-ID: <59b78747.-1@webcrossing.la2eafNXanI>
Date: Thu, 15 Jan 2009 22:18:40 -0800
Lines: 39
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit