Quantcast
Channel: Adobe Community : Popular Discussions - InDesign SDK
Viewing all 78596 articles
Browse latest View live

testing inDesign CC 2015 with c# : InvalidCastException error

$
0
0

Hi

I try to use testing inDesign CC 2015 version with this C# asp.net code

 

protected void Page_Load(object sender, EventArgs e)

{

     InDesign.Application app = (InDesign.Application)COMCreateObject("InDesign.Application");

 

     // other code

     ...

}

 

public static object COMCreateObject(string sProgID)

{

     Type oType = Type.GetTypeFromProgID(sProgID);

     if (oType != null)

     {

          return Activator.CreateInstance(oType);

     }

 

     return null;

}

 

When i run this, i receive an InvalidCastException

I try some of different cast sequence but the result is always the same, i can't recover the com object.

InDesign was launch succefully, the object was create, but i can't use it.

 

I search on different topic and forum, try lot of solution but none of them work.

 

Any help?

 

ps : sorry for my bad english, i am french (no, no, don't throw stone at me )

 

Nymau


"Plug-in is either missing plug-in resource or ..." under VS2015 in Debug/x64 mode

$
0
0

I'm trying to run example: BasicDialog.

It is compiling in Debug/x64 mode by VS2015 and run with Adobe InDesign CC Debug Build 9.2(Win 64) WIN

It is last version of Indesign CC Debug downloaded from "Technology Partner Software Downloads" website.


VS2015 version:

Microsoft Visual Studio Enterprise 2015, Version 14.0.24720.00 Update 1

 

I get assert error:

 

"BASICDIALOG.SDK.PLN" Plug-in is either missing plug-in resource or the Model/UI attribute is not specified in PlugIn Version resource!

..\..\..\source\omlib\plugins\PlugInList.cpp (771)


This is my output:

1>  Performing Custom Build Tools

1>  ODFRC deleting old resources...

1>  merge_res.cmd - calling ConcatRes

1>          1 file(s) copied.

1>  ConcatRes skipped since ".\..\objDx64\BasicDialog"\BscDlg.fres is an empty file.

1>  merge_res.cmd done.

1>  Deleting old resources...

1>  18 File(s) copied

1>     Creating library ..\..\..\build\win\objDx64\BasicDialog/BasicDialog.lib and object ..\..\..\build\win\objDx64\BasicDialog/BasicDialog.exp

1>  BasicDialog.sdk.vcxproj -> C:\Indesign SDK\plugin_sdk_072_20150618\plugin\build\win\prj\..\debugx64\SDK\BasicDialog.sdk.pln

1>          1 file(s) copied.

1>  restore_res.cmd done.

========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========


In Release/x64 mode and Adobe InDesign CC 2015 everything is OK.


Where is problem?

Convert XML to IDML

$
0
0

Hi Experts,

 

I am new to InDesign Development, I was an InDesign(CS2) Template Designer few years before.

We are going to develop XML to IDML from the scratch for the simple journal, Please any one advice me for the below questions:

 

1. Is InDesign SDK tool must for XML to IDML?

2. Will I be able to run Java application developed in Windows Desktop, in Mac as well?

3. What are the Plugins required?

4. Any free library is available?

 

Thanks in advance.

 

Regards

Saran

[Bug] [Indesign CC 2015 11.4 SDK] API in XMLContentReference not returning the correct output according to use case

$
0
0

I could find the correct forum to report the SDK bug hence reporting this here. If anyone know of the correct forum/channel to report bugs, kindly let me know.

 

The header file provides us with the below enum to find the type of content associated with the XMLElement.

/** the type of the content */  enum ContentType {  kContentType_Text = 0, /** content is text (PCDATA) */  kContentType_PageItem, /** page item */  kContentType_Table, /** table */  kContentType_TableGrid, /** table row */  kContentType_TableCell, /** table cell */  kContentType_NoContent /** no content is associated with this. Note that this is different than text content that's empty */  };

 

Along with the above enum, the header also provides an API

XMLContentReference::GetContentType()

which returns one of the above mentioned enum value.

 

But when I traversed the document XML tree, going thru each XML Element, I could always get the correct enum for the type of content associated with the XML Element apart from the cases where actual content was delete from the page.

 

Cases, where the actual frame/text with which the XMLElement was associated has been deleted from page, I was expecting to get kContentType_NoContent, but instead, it always returns kContentType_Text.

 

Also, when I tried API XMLContentReference::IsNoContent()for such XMLElements whose associated frame/text is deleted, It returns false.

How to get a cell count of a column?

$
0
0

Hi All,

 

How to get a cell count of a column?

 

Regards,

Chinna

Unable to open WriteFishPrice in Visual Studio2010 using IndesignCC 2015 plugin sdk?

$
0
0

Hi ,

 

I just started using INDesign CC 2015 (11.2) sdk for plugin development available here Adobe Prerelease , I was trying to build WriteFishPrice plugin using DollyXs as my exercise but while launching the WriteFishPrice Project file , I am getting following error in Visual studio Capture1.PNG

 

Below is the path given by me in DollyXs Ui.

 

Capture.PNG

 

What i deduce over here, it is unable to produce writefishprice project file with .sdk extension , why is it so ? or there is any other problem?

 

Kindly help !!

How to Set and Get Script Label [WIN/CS3]

$
0
0
Hi All, [WIN/CS3]

How can I set and get the script label of a frame in my plugin?

I gone Through forum and found some post on it by "Ken Sadahiro"
http://www.adobeforums.com/webx/.3bbebdc3/0
and by "Bernt Haeussermann "
refer This post:

http://www.adobeforums.com/webx/.3bc37b6b/0

InterfacePtr<IScriptManager>scriptMgr(Utils<IScriptUtils>()->QueryScriptManager(kScriptTag MgrBoss));

But this line is giving error "kScriptTagMgrBoss" undeclared.

should i have to define this in .fr file if yes how can I???

scriptTagData->SetScriptList(scriptList, scriptMgr->GetRequestContext(), label); as told by Bernt.
But in CS3 it takes only two Arguments?????

can any one help how to make it working in CS3.

Thanks for the help.

Reselection on TreeViewWidgets

$
0
0

Hi all,

 

lately I've been transforming all my listboxes to treeview-widgets - except for minor annoyances, things are going smoothly. One of those small things I'm trying to fix is allowing a reselection of a selected item. Listbox-attributes has a "NotifyOnReselect"-attribute, but i haven't found anything similar for treeview-widgets. Is there anything I'm missing? I'd really appreciate any hint or idea how to solve that issue.

 

Thanks in advance,

 

Bernt


How create Indesign application using vc++

$
0
0

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

InDesign CS6 and C# (Regular expression)

$
0
0

GREP does not work

 

//*******************************************

//CODE

//*******************************************

InDesign.Application InDesignApp = (InDesign.Application)Activator.CreateInstance(Type.GetTypeFromProgID("InDesign.Applicati on"));

 

InDesignApp.Activate();

 

//Create Document

InDesign.Document InDesignDoc = InDesignApp.Documents.Add();

 

//PageWidth

InDesignDoc.DocumentPreferences.PageWidth = Convert.ToDouble(numericUpDown_width.Value);

 

//PageHeight

InDesignDoc.DocumentPreferences.PageHeight = Convert.ToDouble(numericUpDown_height.Value);

 

InDesignDoc.DocumentPreferences.PageOrientation = idPageOrientation.idPortrait;

 

InDesignDoc.DocumentPreferences.PagesPerDocument = 50;

 

InDesignDoc.DocumentPreferences.StartPageNumber = 1;

 

InDesign.Page page = (InDesign.Page)InDesignDoc.Pages[1];

InDesign.Layer layer = (InDesign.Layer)InDesignDoc.Layers[1];

 

//Place *.docx in Document

page.Place("C:\\sample.docx", new[] { 0, 0 }, layer, false, true);

 

InDesign.Document Doc = (InDesign.Document)InDesignApp.ActiveDocument;

 

//Clear the find/change grep preferences

InDesignApp.FindGrepPreferences = idNothingEnum.idNothing;

InDesignApp.ChangeGrepPreferences = idNothingEnum.idNothing;

 

//Set the find options

InDesignApp.FindChangeGrepOptions.includeFootnotes = true;

InDesignApp.FindChangeGrepOptions.includeHiddenLayers = true;

InDesignApp.FindChangeGrepOptions.includeLockedLayersForFind = true; ;

InDesignApp.FindChangeGrepOptions.includeLockedStoriesForFind = true;

InDesignApp.FindChangeGrepOptions.includeMasterPages = true;

 

//Regular expression for finding an email address

InDesignApp.FindGrepPreferences.findWhat = "(?i)[A-Z]*?@[A-Z]*?[.]...";

 

Doc.FindGrep();

 

//Apply the change to 24-point text only

InDesignApp.FindGrepPreferences.pointSize = 28;

InDesignApp.ChangeGrepPreferences.underline = true;

Doc.ChangeGrep();

 

//Clear the find/change grep preferences

InDesignApp.FindGrepPreferences = idNothingEnum.idNothing;

InDesignApp.ChangeGrepPreferences = idNothingEnum.idNothing;

 

//******************************************* 

//END CODE

//******************************************* 

where am I wrong?

Error while reading indesign(.indd) file through COM object in c#

$
0
0

I want to read InDesign(.indd) file in c#. I have installed adobe InDesignCS6.

I have added COM reference of 'Adobe InDesign CS6 Type Library' in my c# application.

Code snippet is as follows.

 

        [STAThread]

        static void Main(string[] args)

        {

            InDesign.Application app = (InDesign.Application)COMCreateObject("InDesign.Application");

            Document doc = app.ActiveDocument;

            Page page = doc.Pages[1];

            TextFrame frame = page.TextFrames[1];

            Console.WriteLine(frame.Contents.ToString());

        }

 

        public static object COMCreateObject(string sProgID)

        {

            // We get the type using just the ProgID

            Type oType = Type.GetTypeFromProgID(sProgID);

            if (oType != null)

            {

                return Activator.CreateInstance(oType);

            }

 

            return null;

        }

 

But the first line itself throwing an following error while type casting output of COMCreateObject method into InDesign.Application type.

 

Error :

Unable to cast COM object of type 'System.__ComObject' to interface type 'InDesign.Application'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{ABD4CBB2-0CFE-11D1-801D-0060B03C02E4}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).

 

Kindly help me. Its urgent.

Where can download Indesign CC SDK

$
0
0

Hi everyone,

 

I'm really disappointment with adobe tech support team

waste day-long for chating & calling but they don't know where can download InDesign CC SDK for plug-in development.

many support staff of adobe can't determine the difference between InDesign CC product & InDesign CC SDK and InDesign CS & InDesign CC when send me the link to download is CS version.

also my account(calvin.nguyen@niteco.se) is partner Development and paid money for adobe but can't login to this forum but can login by free-account(trung,vu@niteco.se).

According to the InDesign Developer Center | Adobe Developer Connection then CC SDK is moved to https://prerelease.adobe.com/

to download CC SDK I have to register information and wait 2 days, but I registered over 2day and now I can't access to https://prerelease.adobe.com/ at section "InDesign SDK Access Program"
for CC SDK download.

when I bing all this information to ask Tech support team then they don't known about this process !!!! disappointment!

 

So anyone can let me known where can download InDesign CC SDK??

anyone on the forum, if keeping InDesign CC SDK pls give me a copy, thanks so much

 

Thanks

Error 11 Configuration error

$
0
0

I have installed the Adobe InDesign CC 2017 application from my Creative Cloud Desktop on my Mac Sierra. It works fine. I now want to install the debug version of Adobe InDesign CC 2017 so I copy the content of the blob from the developers prerelease site into the /Applications/Adobe InDesign CC 2017 Debug folder. When I try to launch the application it just shows a Configuration error (Error 11) and quits ??????

How to restrict the Filechooser Dialog within a particular directory?

$
0
0
Hi!

I want to restrict the Filechooser Dialog within a particular folder.

anyone knows how to do this?

thanks,
nataraj

How to recreate a Boss instance when import IDML?

$
0
0

Hi guys,

I have created a customized model and exported it to IDML.

From the PersistentList sample, I found that it recreate the Customized Object with UID when the Create event is invoke.

But, in my code, the Create event is not invoked. Do you have any suggestion about this? Any suggestion is appreciated.

 

Below is the resource added to the .fr.

 

resource VersionedScriptElementInfo(10)
{
    //Contexts
    {
        kFiredrakeScriptVersion, kCoreScriptManagerBoss, kInDesignAllLanguagesFS, k_Wild,
        kFiredrakeScriptVersion, kCoreScriptManagerBoss, kInDesignServerAllLanguagesFS, k_Wild,
    }
   
    //Elements
    {   
        Suite
        {
            kMySuiteScriptElement,
            s_MySuite,
            "persistent list suite",
            "Terms applicable to PersistList operations",
        }
        // Defines new script element object for this plug-in's preferences
        Object
        {
            kMyObjectScriptElement,    // this object's script element ID
            c_My,                        // ScriptID
            "MyModel",        // name
            "MyModel",        // description
            kMy_CLSID,           // Windows CLSID
            NoPluralInfo,                    // CollectionElementType (scriptID, name, descr, CLSID)
            kUniqueIDBasedObjectScriptElement,// base object script element ID
            kMySuiteScriptElement,    // suite script element ID
        }

 

        Event
        {
            kMyDataCreateEventScriptElement,
            e_Create,
            "add",
            "Create a new ^Object",
            ObjectType(kContainerObjectScriptElement),
            "The new ^Object",
            {
                p_Name,
                "name",
                "The name property of the new ^Object",
                StringDefaultType(kMyDataItemNameDefault),
                kOptional,
                WITHPROPERTIESPARAM
            }
        }
   
        Provider
        {
            kMyScriptProviderBoss,
            {
                Parent{ kDocumentObjectScriptElement },    //kDocumentObjectScriptElement, kStoryObjectScriptElement
                RepresentObject{ kMyObjectScriptElement },       
               
                Event{ kMyDataCreateEventScriptElement },                       
                Property{ kNamePropertyScriptElement, kReadWrite },       
            }
        }
    }
};


Can i set a default file name with path when using IOpenFileDialog?

$
0
0

At present, if i use

IDFile xmlDataFile("C:\\a.txt");

openFileDialog->DoDialog(&xmlDataFile, resultFiles, kFalse, &title);

 

It use "C:\" as its default folder, but the file name box is empty, what i want is to show "a.txt" as its default file name.
It looks like there is no such api to set a default in  IOpenFileDialog.

 

Am i right?

How to use a boss class?

$
0
0

Hi everyone,

 

Please explain me how to use a boss class?

 

for example: kSetPageSetupPrefsCmdBoss, kWorkspaceBoss, kDocStyleBoss..

Porting issues with boost::regex when going from CS6 to CC2014 using Xcode

$
0
0

I have a working project in CS6 that uses the boost::regex framework that I'm having problems porting into CC2014.

 

I ported this project by using Dolly to create a new project, then coping the old source files across, finally updating the various out dated InDesign API calls that appeared when I compiled. For the use of regular expressions I added the debug and release builds of the boost_regex.framework to the respective targets.

 

Now, for the debug build the new CC2014 projects builds happily. But when I switch to the release build I get a few linker errors. They are all something like:

 

Undefined symbols for architecture x86_64:

"boost::re_detail::get_mem_block()", referenced from:

boost::re_details::perl_matcher<__gnu_cxx::__normal_iterator<char const *, std::string>, std::allocator<boost::sub_match<__gnu_cxx::__normal_iterator<char const *, std::string> > >, boost::regex::regex_traits<char, boost::cpp_regex_traits<char> > >::find_imp() in SbRegex.o

 

etc.

 

I did a bit of reading through the boost header files. The odd thing is that the "get_mem_block()" appears to be defined for the pre-processor option BOOST_REGEX_NON_RECURSIVE, while in the project settings for BOOST_PREPROCESSOR_DEFINITIONS contains BOOST_REGEX_RECURSIVE. These two settings are mutually exclusive and there's pre-processor logic that blocks having both cases defined at once.

 

This recursive option is used to control how memory is used while processing a regular expression, so seeing a get_mem_block() call (other link errors involve a call to put_mem_block) sort of makes sense being calls that look like something to do with memory.

 

I'm trying to figure out why debug builds, but release build fails. Does this problem look familiar to anyone? Anyone have any suggestions to try to fix it?

SDK samples not compilable

$
0
0

Hi,

 

I am trying to compile the sample projects of the InDesign SDK. Tried it on OS X 10.8.5 with Xcode 5 but I always got the following compiler error "Unsupported compiler 'com.apple.compilers.llvmgcc42' selected for architecture 'i386'".

 

If I am using the default compiler Apple LLVM 5, there are many unknown types like "FORCE_INLINE", "CursHandle" or "const_reference".

 

Does anyone knows how to build the sample projects?

 

 

Kind regards

Where can I download InDesign PlugIns Programming guide?

$
0
0

I am currently want to create InDesign plugin.  Where can I download InDesign PlugIns Programming guide?

Viewing all 78596 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>