jvila

Label object doesn't work for component label

Discussion created by jvila on Jul 4, 2014
Latest reply on Jul 29, 2014 by Patrick.Cashman

Does someone know why this script doesn´t list the components labels?

The same script with z=comp.UID works.

 

Option Explicit

Dim DxdApp, Activeboard, stopblock
Dim Comps, Comp
Dim Prop 
Const DEBUG_ENABLE = 1

 

Set DxdApp = Application ' Aplicacion Dxdesigner
Activeboard = DxdApp.GetActiveDesign()

stopblock = DxdApp.GetProjectData.GetICDBDesignRootBlock(Activeboard)

 

main

 

Sub main
dim z

Set Comps = DxdApp.DesignComponents("", stopblock, "-1", "STD", True)

For Each Comp in Comps  
        z = Comp.Label.TextString
        MsgOutDB (z)
Next

 

Set Comps = Nothing

End Sub

 

 

Sub MsgOutDB( sMsg )

 

If DEBUG_ENABLE = 1 Then
     Call DxdApp.AppendOutput("Debug", sMsg)

End If


End Sub

 

 

 

Regards

Outcomes