2 Replies Latest reply on May 14, 2015 4:50 AM by Simon Turner

    Automation help - inserting components in VB or API using equations and global variable (see attachment)

    Alex Smith

      I have typed below an automation snippet I am working on.  The global variables already exist.  I have my assembly working by suppress / unsuppress of components through the equations interface.  It works good, but I would like to increase the performance of it and gain new knowledge in the process.  Doing it through the equations interface was a necessary evil, but i want to do it using VB or API.  Can anyone coach my on how to accomplish this feat?  Thanks in advance.... 

       

      (GLOBAL VARIABLE) "PUMP_LEN"="100.2"

      (GLOBAL VARIABLE) "FLANGE_TYPE"="1"

      (GLOBAL VARIABLE) "SUCTION_DIA"="1"

      (GLOBAL VARIABLE) "ORING_PRESSURE"="1"

      (GLOBAL VARIABLE) "ORING_ELASTOMER"="2"

       

      iif ( "PUMP_LEN" > = 40 AND "PUMP_LEN" < = 106.63 , "unsuppressed" , "suppressed" )

           INSERT ONLY THE CODE TO “ADD” ASSEMBLY HERE

      Endif

       

      iif ( "SUCTION_DIA" = 4 AND "FLANGE_TYPE" = 1 , "unsuppressed" , "suppressed" )

           INSERT ONLY THE CODE TO “ADD” PART HERE

      Endif

       

      iif ( "ORING_PRESSURE" = 1 AND "ORING_ELASTOMER" = 1 , "unsuppressed" , "suppressed")

           INSERT ONLY THE CODE TO SET CONFIGURATION

      Endif