What can we help you with today?

Log in and chat with an Applications Engineer now! Check out our chat button in the bottom right corner!

What can we help you with today?

Log in and chat with an Applications Engineer now! Check out our chat button in the bottom right corner!

Unconnect conductors

Comments

3 comments

  • bob larranaga
    bob larranaga

    In you're example you were setting the core using the connector. You needed to set the core ID equal to the core itself.

    Example in VBScript. Caution... This will disconnect ALL wires in project.

    Option Explicit
    Dim e3 : Set e3 = CreateObject("CT.Application")
    Dim job : Set job = e3.CreateJobObject()
    Dim cab : Set cab = job.CreateDeviceObject()
    Dim cor : Set cor = job.CreatePinObject()

    e3.ClearOutputWindow

    Dim j, cabCount, cabIds
    cabCount = job.GetCableIds(cabIds)
    e3.PutMessage "Number of cables: " & cabCount
    For j = 1 to cabCount
    Dim cabId : cabId = cab.SetId(cabIds(j))
    Dim k, corCount, corIds
    corCount = cab.GetAllCoreIds(corIds)
    For k = 1 to corCount
    Call DisconnectWire(corIds(k))
    Next
    Next

    Sub DisconnectWire(corId)
    cor.SetId corId

    Call cor.SetEndPinId(1, 0)
    Call cor.SetEndPinId(2, 0)
    End Sub

     

    Was this Helpful?

    0
  • Fernando Peñaloza
    Fernando Peñaloza

    Thank you! that is working, but for some reason when I'm trying to unconnect connectors using scripts that are placed in formboard takes more time than when I do it manually.

    Do you know which can be the reason?

    Was this Helpful?

    0
  • bob larranaga
    bob larranaga

    Sorry. I don't know the reason. 

    Was this Helpful?

    0

Please sign in to leave a comment.