2 Replies Latest reply on Aug 13, 2018 6:51 AM by andrew_french

    hyperlynx automation

    andrew_french

      I'm trying to assign models to a pin and I don't understand the documentation on what its looking for.

       

      The pin object contains the method  AssignModel

       

      AssignModel File, Device, ModelPin – Assigns model specified by file, device (model component) and

      model pin. Returns TRUE if the model is successfully assigned, FALSE otherwise. (See also Object

      representing single Stackup layer (see also Stackup).

       

      What values is it looking for for File, Device, and ModelPin?  Yes I know strings.  I tried pin.AssignModel("demo1.ibs", "COMP1", "in1") and some others but I always get False returned.  I don't know if I have one or many values wrong unfortunately.

        • 1. Re: hyperlynx automation
          kendall_hiles

          More awesomeness from AATK/HyperLynx/Working

           

          Dim HLAPP 'As HLApplication
              'Set HLAPP = CreateObject("HyperLynx.HLApplication") 'Open a new HyperLynx in the background
              Set HLAPP = GetObject("", "HyperLynx.HLApplication")
              'Scripting.AddTypeLibrary ("HyperLynx.HLApplication") 'Add the type lib so we can use enumerated types
              Dim Schem 'As HLSchematic
              Dim Sim 'As HLSimulator
              Dim SimR 'As HLSimResult
            
              'Set Schem = HLAPP.Schematic
             
             
              Set Schem = HLAPP.NewSchematic() 'Lets create a new linesim
              Set Sim = HLAPP.Simulator
              Set SimR = Sim.Result

              Dim IC1 'As HLScmIc
              Dim TL1 'As HLScmTline
              Dim IC2, TL2, i, res
              'tl1.
              MsgBox "Lets add an IC"
              Set IC1 = Schem.AddObject(1) '(hlScmObjTypeIc) 'Add a driver/reciever symbol
              MsgBox "Lets add a Transmission Line"
              Set TL1 = Schem.AddObject(7) '(hlScmObjTypeTline) 'add a transmission line
              MsgBox "Lets connect them"
              Call Schem.Connect(IC1, 1, TL1, 1) 'connect the driver to the transmission line
              MsgBox "Take advantage of the awesome AutoPlace Function"
              Schem.AutoPlace 'use the autoplace to make them pretty
              MsgBox "Lets add another IC"
              Set IC2 = Schem.AddObject(1) '(hlScmObjTypeIc)
              MsgBox "connect them"
              Call Schem.Connect(IC2, 1, TL1, 2)
              MsgBox "More Awesomeness"
              Schem.AutoPlace
              MsgBox "Add a driver model"
              Call IC1.AssignModel("demo1.ibs", "COMP1", "14") 'Assign the driver model
              MsgBox "Add a Reciever model"
              Call IC2.AssignModel("demo1.ibs", "COMP1", "1") 'Assign the reciever model
              MsgBox "Lets run the simualation"
              If Sim.Run Then 'run the simulation

                  'For i = 1 To SimR.Waveforms.Count
                      MsgBox "Show some results"
                      SimR.Show 'Show the waveform
                    
                  'Next

              End If

              MsgBox "FINI"

           

          -kendall

          1 of 1 people found this helpful
          • 2. Re: hyperlynx automation
            andrew_french

            I don't know why I had the signal name stuck in my head as what I should enter for modelPin.  Seems really obvious now...Thanks for the help I got it to work this morning.