简体   繁体   中英

Does SAP PowerDesigner have an API?

Does PowerDesigner have an Java/Python etc. API that can be called so that I can retrieve a physical table's columns and data types programmatically?
Googling did not help me locate a documentation and possibly a tutorial. Any directions would me extremely helpful. Best regards.

The basic API for PowerDesigner uses OLE Automation .

This API is readily accessible from VBScript, .NET languages, PowerShell...

PowerDesigner comes with a helper jar named pdj2com*.jar.

You should have a JavaProxy.doc under the Java Samples sub-directory, with instructions to use this jar.

The code looks like this, from the example for the creation of an Object-Oriented Model:

import org.eclipse.swt.internal.ole.win32.COM;
import com.sybase.stf.powerdesigner.PdCommon.*;
import com.sybase.stf.powerdesigner.PdOOM.*;

int hr = COM.OleInitialize(0);
Application pdApp = Application.getInstance();
Model newModel = new Model(pdApp.CreateModel(PdOOM_Classes.cls_Model, "|Language=Java|Diagram=ClassDiagram"));
newModel.SetName("Customer Management");
newModel.SetCode("CustomerManagement");
com.sybase.stf.powerdesigner.PdOOM.Class newClass = new com.sybase.stf.powerdesigner.PdOOM.Class(newModel.GetClasses().CreateNew());
newClass.SetName("Customer");
newClass.SetCode("Customer");

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM