Establishing a connection between two components via scripting

Hi all,

I am able to create a simple wire connection using scripting using con.create method, Also i have located the symbol on the schematic sheet, I have to connect the pins of the two component symbols say pin 3 of symbol 1 with pin 6 of symbol 2, I have got the pin coordinate points, But when i am trying to connect using script, It doesn't connect the two devices, How to make it possible to connect the pins, Am i missing any steps .... ??



  • Creating a connection doesn't actually draw the graphical connect line.

  • Never mind.

  • Create shti, pnts, x, y; CreateBus shti, pnts, x, y - ConnectionInterface


    Sub Start()

            Dim x

            Dim y

            Set E3 = CreateObject("CT.Application")

            Set prj = E3.CreateJobObject

            Set sht = prj.CreateSheetObject

            Set con = prj.CreateConnectionObject


            shtid1 = sht.Search(0, "1")


            ReDim x(4)

            ReDim y(4)


            x(1) = 180

            y(1) = 120

            x(2) = 180

            y(2) = 92

            x(3) = 228

            y(3) = 92

            x(4) = 228

            y(4) = 120


            con.Create shtid1, 4, x, y


            Set E3 = Nothing


    End Sub

    this creates a wire connection, But my doubt is is there a possibility of connecting two device pins using this con.create method, I am not talking about creating graphical line creation


  • In short , I want to connect two schematic devices using a wire created by script

  • So, to use your example, if x1,y1 and x4,y4 were the locations of pins on the placed device symbols, are you saying it won't connect the line to them?   

  • Yes Paul .. exactly...

  • I am not able to make a connection between two pins using script.. which method should I use to detect the pins and then establish a connection?

  • I haven't actually done it but I don't be why you wouldn't be able to create a connection on an existing pin.

    Getting the pin locations of the placed symbols is actually the hard part.  Taking a quick look at the help, I might use pin.GetSchemaLocation after you get and set the appropriate pin object.  I have never used it so can't be much help on how it works.  (i.e.  the E3 help is not too .clear) 

  • Hi Paul, At last I found the solution for my issue. Once I set the pin id I was able to draw the wire connection, Anyways thankyou so much for helping me out. Have a nice day Paul..!! Cheers

Please sign in to leave a comment.

Didn't find what you were looking for?

New post