Home > Community > Forums > PCB Design > lObject not recognized in TCL script

Email

* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

 lObject not recognized in TCL script 

Last post Mon, Jan 21 2013 10:15 AM by oldmouldy. 1 replies.
Started by neffk 21 Jan 2013 06:47 AM. Topic has 1 replies and 479 views
Page 1 of 1 (2 items)
Sort Posts:
  • Mon, Jan 21 2013 6:47 AM

    • neffk
    • Not Ranked
    • Joined on Mon, Jan 21 2013
    • Posts 2
    • Points 25
    lObject not recognized in TCL script Reply

    When I run the program (below) I get the following error message:

    Capture> source [file normalize {c:/Cadence/SPB_16.3/tools/capture/tclscripts/BEIUtils/BEIListProps.tcl}]

    Capture> BEIListProps::UserProps
    [    1]can't read "lObject": no such variable

    Any idea what could cause this error?  The program is basically copied out of the manual.  Other snippets copied out of the manual work.  I can iterate through schematic pages, etc, but something about the use of the lObject type seems to be causing a problem.

     

    package require capAppUtils
    package require Tcl 8.4
    package require DboTclWriteBasic 16.3.0
    package require Tk
    package provide BEIListProps 1.0

    namespace eval BEIListProps {
      variable BEIListProps;
    }

    proc BEIListProps::UserProps {args} {

      set lStatus [DboState]
      set lNullObj NULL
      set lPropsIter [$lObject NewUserPropsIter $lStatus]
      #get the first user property on the object
      set lUProp [$lPropsIter NextUserProp $lStatus]
      while {$lUProp !=$lNullObj } {
        #placeholder: do your processing on $lUProp
        set lName [DboTclHelper_sMakeCString]
        set lValue [DboTclHelper_sMakeCString]
        $lUProp GetName $lName
        $lUProp GetStringValue $lValue
        puts "$lName = $lValue"
        set lUProp [$lPropsIter NextUserProp $lStatus]
      }
      delete_DboUserPropsIter $lPropsIter
    }


    Filed under:
    • Post Points: 20
  • Mon, Jan 21 2013 10:15 AM

    • oldmouldy
    • Top 10 Contributor
    • Joined on Tue, Jul 15 2008
    • Woking, Surrey
    • Posts 1,454
    • Points 24,710
    Re: lObject not recognized in TCL script Reply
    You are trying to interate over the Properties of $lObject, as a consequence, $lObject has to be set to "something" with properties to iterate through, at present it's not defined which is what the TCL Debugger tells you is up. Set the $lObject first, the call the iterator, something like a PartInst might be good to use.
    • Post Points: 5
Page 1 of 1 (2 items)
Sort Posts:
Started by neffk at 21 Jan 2013 06:47 AM. Topic has 1 replies.