Copy link to clipboard
Copied
Hi
I want to ask that How create Indesign application using vc++ ?
I am able to develop application in C# using COM and generate Interop.Indesign.dll using Adobe Indesign CS5.5 Type Library
I am sucessfully create Indesign instance using this code
Type type = Type.GetTypeFromProgID("InDesign.Application");
InDesign._Application application = (InDesign._Application)Activator.CreateInstance(type);
I am not understand how use COM with vc++ or there is another method to create Indesign instance using vc++.
or
How use Interop.Indesign.dll in vc++ to create indesign instance.
There is no .tlb file in indesign directory by which i generate .h and .cpp file that i can use in my project.
I want to create Indesign in vc++.
Thanks
Hi i am not a VC++ programmer per se so cannot give you the code, but i can give some general steps which can get you going and hopefully solve your problem.
We can use the Indesign COM object to drive Indesign and its functionlaity from VC++ or C# and the like. What we need to do is import the tlb files in our project so that we have the declerations of the methods exposed by the Indesign's COM interface and make a call to them.
The .tlb file is present at "C:\ProgramData\Adobe\InDesign\Version 7
...Copy link to clipboard
Copied
Hi i am not a VC++ programmer per se so cannot give you the code, but i can give some general steps which can get you going and hopefully solve your problem.
We can use the Indesign COM object to drive Indesign and its functionlaity from VC++ or C# and the like. What we need to do is import the tlb files in our project so that we have the declerations of the methods exposed by the Indesign's COM interface and make a call to them.
The .tlb file is present at "C:\ProgramData\Adobe\InDesign\Version 7.0\en_US\Scripting Support\7.0\Resources for Visual Basic.tlb". You can use this to create your .h files using the #import statement.
Once you have the .h created i think you will be able to call the Indesign methods, of course you will have to create an instance of the Indesign application.
Some links that could be of help to you are.
http://forums.adobe.com/message/3783210#3783210
http://forums.adobe.com/message/4407895#4407895
Have a look they discuss the issue you are facing.
P.S.: The .tlb file exists at multiple locations in your system so to be sure that you are using the latest tlb. Search for "Resources for Visual Basic.tlb", rename it and then launch Indesign(it should recreate these files which will have the latest object model). On Win7 launch Indesign using Admin privelages else thes file won't be created.
Manan Joshi
- Efficient InDesign Solutions -
MetaDesign Solutions
http://metadesignsolutions.com/services/indesign-development.php
Copy link to clipboard
Copied
Thanks Manan for Reply
I have CS5.5 on my system. There is no .tlb file exist on my system in indesign directory
My Indesign instalation path is C:\Program Files\Adobe\Adobe InDesign CS5.5
and file path is C:\Documents and Settings\Administrator\Application Data\Adobe\InDesign\Version 7.5\en_GB
at this path there are three folder 1)CompositeFont 2) Scripts 3)Workspaces
There is no Scripting Support folder and no Resources for Visual Basic.tlb file exist
How generate .tlb file plz tell me
If You have .tlb file plz send then i generate .h and .cpp file from this and use in my vc++ project
Thanks
Copy link to clipboard
Copied
Bill, You should have the file on your system. Try searching for the file name in the whole system. And Bill my .tlb file won't be any good for you as the list of plugins loaded by the Indesign on my machine maybe different from your machine.
And if you try to call methods exposed by any such plugin that exists on your machine and not mine then we are headed for a sure crash.
Manan
Copy link to clipboard
Copied
Hi Manan
I already serch Resources for Visual Basic.tlb on my system in all file and folder
There is no such file exist on my system
I am not understand how get .tlb file to solve my problem.
I think Community Member Ramanathan.ct have solution of my problem
How contact this member any way plz tell me
Plz give me any idea to solve my problem.
Thanks
Copy link to clipboard
Copied
Hi Manan
I have create Visual Basic.h and Visual Basic.cpp using Resources for Visual Basic.tlb
Now I want to ask that i am not found default value of any parameter
for example in expot()
objDoc.Export(idExportFormat.idJPG, cstrOutputFile, false, application.PDFExportPresets["Press"], object VersionComments, bool ForceSave);
What is Default value of object VersionComments
and what value of Object Using in case of JPEG export.
Thanks
Copy link to clipboard
Copied
Hi Manan,
that discussion semms to be close to myx current problem.
After fixing a general failure, now top leven variables like kPlugihIDSpace, kCalsssIDSpace and PMIID can't fbe found.
It seems to me, that the link to the Adobe (SDK) object is broken.
Where that link is set.
Is it within the vcproj-File or az the VC7-Properties.
Or do you have another opportunity ti solve that problem?
Kind regards
Jochen
Copy link to clipboard
Copied
Hi Jochen,
It seems you have problems setting up include paths for the project. There are ample amount on resources on how to do it in VS on the internet. This in general does not seem to be a problem related to InDesign sdk at first look. I would suggest to you, invest some amount of time to understand how to setup a project in VS and play around with settings of projects that already compile for you to get a hang of all this. This will not take you more than a couple of hours to understand and after that if you get some errors you would be confident enough to ascertain whether this is project setup issue or something else. If you are short of time and want to get this resolved quickly its better you hire someone to get it done quick for you.
-Manan
Copy link to clipboard
Copied
Hi Manan,
as first some headers were not found, I've added the Include-pathes.
That worked.
But I'v inspected the sampple XMLCatalogHandler project.
There only two relative pathes ..\..\..\external\axe\includes and ..\..\..\external\agm\includes
These both pathes are not existing at my system. But the XMLCatalogHandler PlugIn my be build succesfully.
I'v even started at another VM with a simple Dolly-project and reached the same errors as at my own project.
There also are thrown errors du to not found declarated general values as PMIID, fInvaldPluginID, kInvalidClassID etc, hen copiling the single source files an at buildin UIE.fr is reporting the all the haders to be imported, ar not found.
It seems to me that the error is at the information transfer pch-, rep-, res-, fres-File naming/creation.
I'v I remember right, I'v found last night, that there were differneces for the path||naming of one of the needed files at the Dolly-Project.
In that case it will be quite clear, why some global-header-information is not tranferred to the single source files and no header-information at all is shipped to the UIE.fr-File.
This issue I'll check and will come back to you if needed.
Would be nice, If you could explain me the issue with the additional include pathes and how the XMLCatalogHandler-sample is getting the pathes to all the needed includes.
Thanks and all the best for 2017.
Regards
Jochen
Copy link to clipboard
Copied
Hi Manan,
I've inspected now my project again and found two failures.
The first was a difference within the path at creation of the res file at the cpp files and the import at the UIE.rc-file.
The second was the usage of a wrong makro for the Filename at the build step of the UIE.fr-file.
But these functionalities are not yet reached.
When compiling the cpp-files separately, nearly in all cases PMIID is not found basically.
When building the Project, an error from my UIEID.h ist throw, wich is pointing to the missed kPlugInIDSpace.
When commenting out that line, the next DECLARE_PMID(kClassIDSpace, kUIEActionComponentBoss, kUIEPrefix + 0) will thow the error concernig missed kClassIDSpace.
It is the same situation as at the simple Dollx project.
I can't find information, where PMIID and the k..IDSpace-variables are declared.
Either the link to the Adobe_Object is broken (but that should not happen at a newly created Dolly-Project), or a header is missing.
Could you please give me some advice?
Kind regards
Jochen
Copy link to clipboard
Copied
Hi Manan,
to lokate the causing of the uncatched dynamic cast error I had to exclude most of the files from my project an comment out lots of code lines.
The reanination of my project was not really easy.
But now the building process is working genarally corectly.
But I get errors from all classes.
Nearly from any class as the first logged line is reported the missing PMIID.
It seems that tha following errors are mostly du to the initial error.
What is missing?
May you give me information, where PMIID is declared.
Probably that file will hold more declarations, I'm requiring.
Or is missing a setting at the project, or some where, to get access tho the global variables.
Kind regards
Jochen
Copy link to clipboard
Copied
Hi Manan,
now I've al the required functionalit.
There is only left the following question:
As I would like to modify the Standard-File-Menu only after loading a production order-XML.
That way is bundeled with the opporunity I want to provide, where the users shall be able to skipp the integration with the work flow system to work stand allone.
In that case I want to disable the own Catalog-Upload-menu-item, open a standard document and set the standard menu-Hit-Funktionality.
Is that modificatio of the standard ID-File-menu possible outside of the FR-File?
Kind regards
Jochen Seliger