-
1. Re: CS6: InsertLabel and Extractlabel not working after DPS Desktop tools install
mmargeta Dec 29, 2012 1:51 AM (in response to mmargeta)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 Dec 29, 2012 3:36 AM (in response to mmargeta)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 Dec 29, 2012 5:38 AM (in response to Jump_Over)@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 Dec 29, 2012 4:11 PM (in response to mmargeta)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 Dec 29, 2012 5:32 PM (in response to mmargeta)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)
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. Dec 29, 2012 11:42 PM (in response to mmargeta)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) -
7. Re: CS6: InsertLabel and Extractlabel not working after DPS Desktop tools install
mmargeta Dec 30, 2012 1:46 PM (in response to Harbs.)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



