Update label in project

Lasă un comentariu

6 Noiembrie 2014 de liviustoica55


Running the below job on a system with MorphX VCS and one form checked-out that uses „@SYS1”, will update the form to use „@SYS5”.

 

static void testUpdateAOTAssumption(Args _args)

{

#Winapi

#AOTExport

SysVersionControlCreateProject projectCreator = SysVersionControlCreateProject::construct();

str tmpFileName = WinAPI::getFolderPath(#CSIDL_INTERNET_CACHE)+’\\project.xpo’;

SysTreenode systreenode;

ProjectNode project;

TextBuffer tb = new TextBuffer();

 

//Create project of pending elements

projectCreator.parmProjectName(‘tmpProject’);

projectCreator.run();

 

//Export project to xpo file

project = SysTreenode::getPrivateProject().AOTfindChild(‘tmpProject’);

project = project.getRunNode();

project.treeNodeExport(tmpFilename, #export | #expKeepIds | #expLayer);

 

//Do replace operations in file

tb.fromFile(tmpFilename);

tb.replace(literalstr(„@SYS1”), literalstr(„@SYS5”));

tb.toFile(tmpFilename);

 

//Import XPO file

systreenode = systreenode::newTreeNode(project);

systreenode.fromFile(tmpFileName);

}

Lasă un răspuns

Completează mai jos detaliile despre tine sau dă clic pe un icon pentru autentificare:

Logo WordPress.com

Comentezi folosind contul tău WordPress.com. Dezautentificare / Schimbă )

Poză Twitter

Comentezi folosind contul tău Twitter. Dezautentificare / Schimbă )

Fotografie Facebook

Comentezi folosind contul tău Facebook. Dezautentificare / Schimbă )

Fotografie Google+

Comentezi folosind contul tău Google+. Dezautentificare / Schimbă )

Conectare la %s

%d blogeri au apreciat asta: