4 Replies Latest reply on Nov 13, 2008 3:34 AM by (dark_gf)

    InDesign Object reference

    Level 1
      Hi to all.

      I'm using C#(Visual studio 2005) to automate indesign application, but i cant find object documentation to InDesign library, javascript reference is similar to it but there is too many distinctions. Where i can find such reference?
        • 1. Re: InDesign Object reference
          Level 1
          Hi dark_gf,

          For C#, you'll want to use the COM library--same as for VBScript and all of the flavors of Visual Basic. You should be able to view the object model in C#.

          I have to state, thought, that C# is not a good choice for InDesign automation. VBScript or JavaScript are better choices--InDesign scripting is loosly typed by design, and the farther you go from the supported languages, the more trouble you'll have.

          Thanks,

          Ole
          • 2. Re: InDesign Object reference
            Level 1
            Thx Olav Kvern

            Object model viewer in visual studio is too simple(only functions and members) and he does not describe what parameters needed that function, for example:

            InDesign.TextFrame Add(object Layer, InDesign.idLocationOptions At, object Reference)

            "object Layer" why they associated layers which objects(mb better if it would be "Layer layer")?

            "object Reference" how get to know which object i need to use?
            and there most functions like this

            Yeah i know that javascript is better to automate indesign, but there is several problems for me:
            1. I need closed source code.
            2. There is no complete javascipt reference.
            3. IDE like "Adobe ExtendScript Toolkit 2" is simple, hard to code and debug.
            • 3. Re: InDesign Object reference
              Level 1
              Hi dark_gf,

              The references are all the same. What you're not seeing is that all of the parameters are optional (C# doesn't allow optional parameters). Why not look at the Scripting Guide--there are many examples of creating a text frame.

              re: "1. I need closed source code."

              By this I assume you mean compiled code--you can compile JavaScript (refer to the JavaScript Tools Guide) as binary (.jsxbin).

              re: "2. There is no complete javascipt reference."

              Yes, there is. It's in the object model viewer in the ESTK. You can also use jongware's HTML version (search the forum for this).

              Thanks,

              Ole
              • 4. Re: InDesign Object reference
                Level 1
                Thx u helped a lot i have solved most problems but i have one more in CS4:

                TextFrame tf - some text frame.

                tf.AppliedObjectStyle.ObjectEffectsEnablingSettings.EnableDropShadow = true; - does not enable drop shadow(but this was working in CS3).