on ‎2019 Oct 16 12:18 PM
Hello Community,
i am searching for the function or the method call to get a specific model from the List "Models" (which contains all opened models)
In PowerShell I can achieve this by
$powerDesigner = New-Object -com powerdesigner.application
$targetModel = $powerDesigner.Models | Where Code -eq $targetModelCode
In PowerShell I then have the model object in the variable targetModel.
I need the same now in VBScript.
Is there some kind of method like FindChildByCode for the Model List? The documentation says that Models is a global object reference list, but I don´t see a method to get a specific item out of this list...
Kind regards
Stephan
Request clarification before answering.
Perhaps something like this:
set ws = ActiveWorkspace
for each wsmdl in ws.children
if wsmdl.modelType = "PDM" and not wsmdl.ModelObject is Nothing then
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 12 | |
| 9 | |
| 7 | |
| 5 | |
| 4 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.