MaBUa

PutUserLayerText - visibility

Discussion created by MaBUa on Dec 1, 2011
Latest reply on Dec 2, 2011 by john_dube

Hello,

  I have got a question about the visibility of user layer text. The VB script below inserts a new text into the user layer but so far I don't see the text displayed in the Expedition PCB v7.9.2. layout.

Is there anytihing wrong with the parameters of PutUserLayerText?

Thank you,

MaBUa

 

 

' Get the active document

Dim pcbDoc

Set pcbDoc = pcbApp.ActiveDocument

 

' License the document

If (ValidateServer(pcbDoc) = 1) Then

 

    ' add a reference to the MGCPCB type library in order to use enums

    'Scripting.AddTypeLibrary("MGCPCB.ExpeditionPCBApplication")

    Scripting.AddTypeLibrary("MGCPCB.Application")


    Dim cmps, cmp, ULayer, pocet

    Dim usrTxts, usrTxt, userLayerNameStr

 

    userLayerNameStr = "RefDes_for_NestedCells"

    Set ULayer = pcbDoc.FindUserLayer( userLayerNameStr )

    If ULayer Is Nothing Then

       Set ULayer = pcbDoc.SetupParameter.PutUserLayer( userLayerNameStr )     

    End If

 

    Dim newTextObj4

    Set newTextObj4 = pcbdoc.PutUserLayerText( "Nazdar", 0, 0, ULayer, 80, 0, 10, "VeriBest Gerber 0",, epcbJustifyLeft, epcbJustifyVCenter, Nothing, epcbUnitDatabase)

End If

....

Outcomes