Skip to main content
Participant
March 22, 2011
Answered

Issue with dataset.display in illustrator4

  • March 22, 2011
  • 1 reply
  • 672 views

I'm opening a document, importing a XML with dataset using activeDocument.importVariables and then displaying the dataset. When I run the code on already opened document then it dataset is changed and displayed in illustrator document but if I open a new document through code and then execute the code to import variables and display dataset then dataset is not displayed. Below is my code for both the cases.

1) When document already opened

activeDocument.importVariables(File ('/E/Projects/Illustrator/Temp/TempFile.xml'));
app.activeDocument.activeDataset = activeDocument.dataSets.getByName("CURRENT");
app.activeDocument.activeDataset.display();

This code runs without problems and changes variable values are displayed.

2) When code for opening the document is executed

var myDocument = app.open(File("/E/Projects/Illustrator/Templates/test6.ait"));

myDocument.activate();

activeDocument.importVariables(File ('/E/Projects/Illustrator/Temp/TempFile.xml'));
app.activeDocument.activeDataset = activeDocument.dataSets.getByName("CURRENT");
app.activeDocument.activeDataset.display();

Values of active dataset is not shown in the document and in the variables panel , selected dataset is not shown selected though variables are imported successfully.

Do I need to do something else to show the dataset?

This topic has been closed for replies.
Correct answer Ten A

I think that below page as a reference.

http://forums.adobe.com/thread/513517?tstart=1


Ten

1 reply

Ten A
Community Expert
Ten ACommunity ExpertCorrect answer
Community Expert
March 22, 2011

I think that below page as a reference.

http://forums.adobe.com/thread/513517?tstart=1


Ten

meen2410Author
Participant
March 23, 2011

Thanks Ten, I'll go through this and see if my issue is resolved.

meen2410Author
Participant
March 24, 2011

Thanks A millon Ten...

My issue is resolved....