To use OLE Automation to communicate with PowerDesigner, you need to:
Create an instance of the PowerDesigner Application object
Prefix all global functions with the PowerDesigner Application object
Release the PowerDesigner Application object before exiting the program
Specify objects type whenever possible (Dim obj As <ObjectType>)
Adapt the object class ID syntax to the language when you create object
Add references to the object type libraries you need to use