7 Replies Latest reply on Dec 30, 2012 1:46 PM by mmargeta

    CS6: InsertLabel and Extractlabel not working after DPS Desktop tools install

    mmargeta Level 1

      Hi to all,

       

      I have an issue in VB.NET script with InsertLabel and ExtractLabel functions in InDesign CS6 after I installed DPS Desktop tools. Everything worked fine with clean install of InDesign CS6 but after DPS install I'm getting error on these functions.

      Other procedures like opening document, closing, saving inside app work fine but on these 2 functions I'm getting this:

       

      System.MissingMemberException: Public member 'InsertLabel' on type 'TextFrame' not found.

         at Microsoft.VisualBasic.CompilerServices.LateBinding.InternalLateCall(Object o, Type objType, String name, Object[] args, String[] paramnames, Boolean[] CopyBack, Boolean IgnoreReturn)

      on

      ...

      myTextFrame.InsertLabel("status", "T")

      ...

       

      System.MissingMemberException: Public member 'ExtractLabel' on type 'TextFrame' not found.

         at Microsoft.VisualBasic.CompilerServices.LateBinding.LateGet(Object o, Type objType, String name, Object[] args, String[] paramnames, Boolean[] CopyBack)

      on

      ...

      label = myTextFrame.ExtractLabel("status")

      ...

       

      I know that uninstall everything and clean install of CS6 without DPS solves my problem, but I'm hoping of something else.

       

      Kind regards,

      Marko

        • 1. Re: CS6: InsertLabel and Extractlabel not working after DPS Desktop tools install
          mmargeta Level 1

          Is it possible that none of you guys run into this one... I have this issue on a lot of computers. So just to explain one more time...

           

          Requirements: Win 7, InDesign CS6, some VB .Net app for InDesign

          1. install InDesign CS6

          2. try to use InsertLabel or ExtractLabel function for any selected object in opened indesign document - works fine

          3. do the InDesign Update which includes also DPS Desktop tools CS6

          4. try again step 2 - doesn't work and you will get "System.MissingMemberException: Public member 'InsertLabel' on ..... not found"

           

          Can anyone verify this pls.

          • 2. Re: CS6: InsertLabel and Extractlabel not working after DPS Desktop tools install
            Jump_Over Level 5

            Hi,

             

            I didn't run into this and even can't imagine how it is possible...

            but have a question:

            Are you typing your part of code or copying it?

            Cause JS is "case sensitive" and it suppose to be:

            myTextFrame.insertLabel("status", "T")

            instead of

            myTextFrame.InsertLabel("status", "T")

             

            You could check if insert/extractLabel method work runing some simple code with them.

            Is it working or not?

             

            rgds

            • 3. Re: CS6: InsertLabel and Extractlabel not working after DPS Desktop tools install
              Laubender Adobe Community Professional & MVP

              @Jump_Over – this is VisualBasic, not JavaScript (ExtendScript).
              So I think this is the right syntax…

               

              I wonder if it is possible to use a JavaScript snippet inside the VB.NET script.
              I'm on Mac OS, so I'm no great help on that. Sorry.

               

              Uwe

              • 4. Re: CS6: InsertLabel and Extractlabel not working after DPS Desktop tools install
                mmargeta Level 1

                Well, I thought that it's not possible also but it happens all the time. So, I have a VB .Net App that controls InDesign and InCopy and it is working great with CS4, CS5 and CS6, but after installing CS6 DPS Desktop tools I get:

                 

                System.MissingMemberException: Public member 'ExtractLabel' on type 'TextFrame' not found (also for InsertLabel method)

                 

                The weird thing is that other calls work ok, but I get an error on this. And, of course, after that... deactivate, uninstall, install, activate... do not install DPS - and everything is ok again.... Little bit frustrating, so I'm just looking for someone with the same issue.

                 

                For some reason my VB dot Net App do not like when I install DPS Desktop tools.

                 

                Marko

                • 5. Re: CS6: InsertLabel and Extractlabel not working after DPS Desktop tools install
                  mmargeta Level 1

                  OK... Tried one more time...

                   

                  1. JS - working before and after installing DPS

                  main();

                  function main(){

                      var doc = app.documents.add();

                      var page = doc.pages.add();

                      var rect = page.rectangles.add();

                      rect.insertLabel("testlabel","My label content");

                      alert(rect.extractLabel("testlabel")); // Shows My label content

                  }

                   

                  2. VBS - working only before installing DPS, after installing DPS -> display error

                  Set myInDesign = CreateObject("InDesign.Application")

                  Set myDocument = myInDesign.Documents.Add

                  Set myPage = myDocument.Pages.Item(1)

                  Set myRectangle = myPage.Rectangles.Add

                  myRectangle.InsertLabel "CustomLabel", "This is some text stored in a custom label."

                  myString = myRectangle.ExtractLabel("CustomLabel")

                  MsgBox ("Custom label contained: " + myString)

                   

                  screen_error.png

                  Please, someone confirm this. Just create these two scripts inside InDesign CS6. If you have DPS installed you should get error on VBS.

                   

                  Tnx!

                  Marko

                  • 6. Re: CS6: InsertLabel and Extractlabel not working after DPS Desktop tools install
                    Harbs. Level 6

                    I can't test on Windows, but this workaround might help:

                     

                    Set myInDesign = CreateObject("InDesign.Application")
                    Set myDocument = myInDesign.Documents.Add
                    Set myPage = myDocument.Pages.Item(1)
                    Set myRectangle = myPage.Rectangles.Add
                    Set myScript = "app.documents.item(0).rectangles.itemByID(" + myRectangle.ID + ").insertLabel('CustomLabel', 'This is some text stored in a custom label.')"
                    app.DoScript(myScript,ScriptLanguage.JAVASCRIPT);
                    Set myScript = "app.documents.item(0).rectangles.itemByID(" + myRectangle.ID + ").extractLabel('CustomLabel')"
                    myRectangle.InsertLabel "CustomLabel", "This is some text stored in a custom label."
                    myString = app.DoScript(myScript,ScriptLanguage.JAVASCRIPT);
                    
                    MsgBox ("Custom label contained: " + myString)
                    
                    1 person found this helpful
                    • 7. Re: CS6: InsertLabel and Extractlabel not working after DPS Desktop tools install
                      mmargeta Level 1

                      Hi Harbs,

                       

                      tnx for reply... this is definitely a workaround if there is no other thing to do but changing the entire code (which is quite large btw.).

                       

                      Workaround is also to not install DPS CS6, which for now is something that I do...

                       

                      But I think that there shouldn't be a workaround in this case and I'm pointing that this could be an Adobe issue because the installation of DPS in InDesign is changing or messing up an InDesign VB library which results that these method calls don't work.

                       

                      I would just like to confirm this issue and someone from development could maybe investigate this deeper.

                       

                      Kind regards,

                      Marko