Quantcast
Channel: Mentor Graphics Communities: Message List
Viewing all articles
Browse latest Browse all 4541

Re: How to know how many variants are there in a specified prj by VBS

$
0
0

  Set DXDApp = GetObject(, "viewdraw.Application")

    Set VMaddin = DXDApp.AddIns("Variant Manager")

 

   If VMaddin Is Nothing Then

    invokeVM

   Else

    VMaddin.visible = True

   End If

 

    Set vmdoc = VMaddin.Control.VariantGuiApplication.VMDocument

    Set vmvar = vmdoc.Variants

    Debug.Print vmvar.Count

 

Private Function invokeVM() As Boolean

Set VMaddin = DXDApp.AddIns.Add("MGCVARIANTGUI.MGCVariantGUICtrl.1", "Variant Manager", associatedScript)

If VMaddin Is Nothing Then

  invokeVM = False

  MsgBox "not possible to start Variant Manager; Please start it manually", vbCritical

Else

  invokeVM = True

  VMaddin.visible = True

End If

End Function


Viewing all articles
Browse latest Browse all 4541

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>