This script is from Mentor's automation tutorial....
I can not get this line to work...any help/suggestions?
Set usrLyrGfxObj = pcbDocObj.PutUserLayerGfx(userLayerObj,
I have attached the entire script below...
Finduserlayer(..) will return nothing if the userlayer doesn't exist so best to add a check after it:
if userLayerObj is nothing then
Set userLayerObj = pcbDocObj.SetupParameter.PutUserLayer("Test") 'Let's make a new user layer
'pick color so it isn't a dark one
set pcbDocObj.ActiveView.DisplayControl.Global.UserLayerColor("test") = pcbAppObj.Utility.NewColorPattern(255,255,255) 'rgb
' Ensure the user layer is turned on
pcbDocObj.ActiveView.DisplayControl.UserLayer("Test") = True
Also make sure that the array doesn't self intersect since it's a polygon (can try to draw polyline by changing numPntsInt to (numPntsInt - 1) and filledBool = false so begin and endpoint is different and it draws a polyline)
Retrieving data ...