Unofficial Content
  • This documentation is valid for:

Edit your .cs file and add the following using statements:

using Artech.Architecture.Common.Objects;
using Artech.Architecture.Common.Services;
using Artech.Architecture.BL.Framework.Services;
using Artech.Architecture.UI.Framework.Services;

Then use the following code to import from an XPZ file:

IOutputService output = CommonServices.Output;
// "pathDelXpz" defines the path of the .xpz to be imported
string pathDelXpz = "......";
// Define the options for the import as defaults
ImportOptions iOpts = ImportOptions.Default;
// Import the .xpz to the current model using iOpt as options for the import
if (BLServices.KnowledgeManager.ImportFile(pathDelXpz, UIServices.KB.CurrentModel, iOpts))
{
	// Success
	output.Show("Success");
}
else
{
	// Import falied
	output.Show("Import Failed");
}

Last update: February 2024 | © GeneXus. All rights reserved. GeneXus Powered by Globant