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 .... ??

0

Comments

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

    0
    Comment actions Permalink
  • Never mind.

    0
    Comment actions Permalink
  • Create shti, pnts, x, y; CreateBus shti, pnts, x, y - ConnectionInterface

    Start

    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

     

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

    0
    Comment actions Permalink
  • 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?   

    0
    Comment actions Permalink
  • Yes Paul .. exactly...

    0
    Comment actions Permalink
  • 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?

    0
    Comment actions Permalink
  • 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) 

    0
    Comment actions Permalink
  • 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

    0
    Comment actions Permalink

Please sign in to leave a comment.

Didn't find what you were looking for?

New post