Home > Community > Forums > PCB SKILL > Problems with Tutorial

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: *

 Problems with Tutorial 

Last post Wed, Jul 24 2013 10:48 PM by JuergenWeber. 3 replies.
Started by budnoel 23 Jul 2013 11:35 AM. Topic has 3 replies and 455 views
Page 1 of 1 (4 items)
Sort Posts:
  • Tue, Jul 23 2013 11:35 AM

    • budnoel
    • Top 50 Contributor
    • Joined on Tue, Aug 12 2008
    • Rochester, NY
    • Posts 129
    • Points 2,100
    Problems with Tutorial Reply
    I have been attempting to learn SKILL by following a tutorial I found at referencedesigner.com   I've copied the instructions from the tutorial below and when I attempt to run the command I get the following message:  Command > formbutton
    E- *Error* axlFormDisplay: argument #1 should be any user-defined (other) type (type template = "o") - nil   Can anyone explain what might be wrong?  Thanks in advance.
    SKILL code tutorial begins here :

    Allegro SKILL Tutorial | Forms




    Copy the following code in a file form.il and save it in the directory C:/cadence/setup/skill (or the directory that allegro.ilinit points to). 

     
    axlCmdRegister( "formbutton" `formbutton)
    ; -----------------------------------------------------------------
    procedure( formbutton()
    
    	les1_form = axlFormCreate( (gensym) "les1.form" nil 'les1_form_Action t)
    	axlFormDisplay(les1_form)
    
    ); end of procedure
    ; -----------------------------------------------------------------
    procedure( les1_form_Action(les1_form)
    	case( les1_form->curField
    
    		("Close_button"
            	axlFormClose( les1_form )
    		 	axlCancelEnterFun( )
          	); --------------------------
    
     		("Run_button"
    			if( axlFormGetField( les1_form "report") then  
    				axlUIConfirm( "Report value is t (True) ")
    			else
    				axlUIConfirm( "Report value is nil (False) ")
    			); end if
    			
          	); --------------------------	
    	); end case
    ); end of procedure
    ; -----------------------------------------------------------------
    


    What does this skill code do



    There are four axl statements for the form

    axlFormCreate - Creates a Form
    axlFormDisplay - to Display the form
    axlFormClose - to Close the form 
    axlFormGetField - retrieve the elements in the form



    Other code should be easy to follown. 
    Now creat another file called les1.form with the following content 
     
    FILE_TYPE=FORM_DEFN VERSION=2
    FORM
    FIXED
    PORT 25 20
    HEADER "Referencedesigner.com"
    
    TILE
    #======================
    FIELD report
    FLOC 2 2
    CHECKLIST "Create report"
    ENDFIELD
    
    
    FIELD Run_button
    FLOC 2 17
    MENUBUTTON "Run" 7 3
    ENDFIELD
    
    FIELD Close_button
    FLOC 11 17
    MENUBUTTON "Close" 7 3
    ENDFIELD
    
    #======================
    ENDTILE
    
    ENDFORM
    

    Save the file in the same directory as you brd file. Assuming everything is right you can just type hello form at the Command and it will pop up a form.  
    • Post Points: 20
  • Tue, Jul 23 2013 7:47 PM

    • eDave
    • Top 10 Contributor
    • Joined on Sun, Jul 13 2008
    • Christchurch, 00-NZ
    • Posts 687
    • Points 14,555
    Re: Problems with Tutorial Reply
    Did you save the form in the same folder as your brd file? Check also that the name of the form matches exactly the one in the axlFormCreate line of the code.
    Dave Elder, Tait Communications
    • Post Points: 20
  • Wed, Jul 24 2013 4:40 AM

    • budnoel
    • Top 50 Contributor
    • Joined on Tue, Aug 12 2008
    • Rochester, NY
    • Posts 129
    • Points 2,100
    Re: Problems with Tutorial Reply
    Saving the form in the same directory as my board file was the trick.  Thanks, Dave.  You're the best!!
    • Post Points: 20
  • Wed, Jul 24 2013 10:48 PM

    • JuergenWeber
    • Not Ranked
    • Joined on Wed, Feb 15 2012
    • Nuernberg, Bavaria
    • Posts 15
    • Points 255
    Re: Problems with Tutorial Reply

     Hi,

    Allegro looks at for configuration files in the following default locations:

    Cadence provided default configuration files: <cdsroot>/share/pcb

    Site (company) provided location (this is called CDS_SITE):<cdsroot>/share/local/pcb

    see attached PDF

     

    BR,

    Jürgen

     

    Juergen Weber GCD Printlayout GmbH 91056 Erlangen Germany
    • Post Points: 5
Page 1 of 1 (4 items)
Sort Posts:
Started by budnoel at 23 Jul 2013 11:35 AM. Topic has 3 replies.