1 Reply Latest reply on Dec 15, 2014 4:22 PM by nick_hong

    VB Script Capitalize

    qahmadi

      I am  using VB script to create costume menu on DxDesigner to capitalize all  properties and lables, values etc of a component such as capacitor or  resistor on the design display to capital letters from small letters.

      I'm not sure how i go about doing this. I understand the use of UCase(), however not sure how to apply this to Designer files.

      For example:

      I have a vbs file which create and generate menu and sub menu options as such:

       

      Path = "This is the directory folder where all vbs files are located"

      Version:0.9 StartHTML:00000107 EndHTML:00000980 EndFragment:00000940 EndFragment:00000000

      Set sMenu = CommandBars("Sheet Menu Bar").Controls.Add(cmdControlPopup,,,8)
      sMenu.Caption = "&MainMenuTab"
      'Add buttons to this menu

       

       

       

      Set sButton = sMenu.Controls.Add
      sButton.Caption = "CAPS ALL"
      sButton.OnAction = "run " + PATH + "CapsAll.vbs"

       

       

      So basically CapsAll.vbs is the file i need to generate in order to capitalize everything.

      Thank you very kindly for any help

        • 1. Re: VB Script Capitalize
          nick_hong

          Hi qahmadi,

           

          Actually this community is aimed at Korean users.

          Anyway in order to process the properties in DxDesigner, you will need to walk every schematic sheets in the project, get component collections from each sheets, and process properties that are attached to each component.

          The example code of http://communities.mentor.com/docs/DOC-4050 could make a good starting point since the script is designed to scan all schematic sheets of a DxD project and access components

          You will be able to get more help from 'Automation and Scripting' community for world-wide users at below.

           

          Automation and Scripting

           

          Nick