1 Reply Latest reply on Oct 23, 2018 12:54 AM by peter_festesen

    Is there a possibility to set a filename to the VMBOM output?


      I try to write a vbscript

      Output name for master is: _master.xls

      Output name for variant is: Variant1.xls


      But I wish that the output file name of the master bom file is like the following format:

      ProjectName & "_MASTER_STL"

      example: PCB_5566_000S_MATER_STL.xls


      The format for the variants should be like following format:

      VariantName & "_STL"

      example: PRT_5566_010S_V001_STL.xls


      How can I do it?



        • 1. Re: Is there a possibility to set a filename to the VMBOM output?

          Hi - I found this script (it came from John Dube originally, but I couln't find it here in the community). It uses a filesystem construct to define the output. Look at lines 50-to 54


          Dim FSO : Set FSO = CreateObject("Scripting.FileSystemObject")

          Dim vmbom : Set vmbom = vmaddin.Control.VariantGuiApplication.BOM


          vmbom.format = eVMHTML

          vmbom.OutputPath = FSO.BuildPath(dxdApp.GetProjectData.GetProjectPath(), GetTopBlockName(dxdApp))

          I took it for a quick spin in VX.2.4, but it fails, and may need some fiddling for VX releases (look in the file to see the usage, it uses mgcscript in a MGC BCD CMD shell).

          I hope this helps...