• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Allegro X PCB Editor
  3. A Small SKILL Routine to Draw Dynamic Graphic

Stats

  • Replies 3
  • Subscribers 160
  • Views 14202
  • Members are here 0
More Content

A Small SKILL Routine to Draw Dynamic Graphic

leonlee
leonlee over 13 years ago

 This a small skill routine just for entertainment.

Source code:

axlCmdRegister( "GraphicTest" `GraphicTest ?cmdType "interactive")
defun(GraphicTest ()
axlKillDesign()
_layer = "board geometry/outline"
declare( fibo[100])
arrayp(fibo)
for( i 0 2 fibo[i] = i)
for( i 3 20 fibo[i] = fibo[i-1] + fibo[i-2])
GraphyTimer()
 );defun 
 
 procedure( GraphyTimer()                 
                     Count = 0    Count2 = 1     M=20            
                     ID = axlUIWTimerAdd( nil M nil 'GraphyTimeCallback )                                            
                  );procedure
 
 procedure( GraphyTimeCallback( window ID elapsedTime )
                      Count++
                      Circle = caar(axlDBCreateCircle( list( list( fibo[Count2] 0) fibo[Count2]-fibo[Count2-1] ), 0, _layer) )
                      axlTransformObject(Circle, ?angle Count*360/M, ?origin 0:0)
                      axlWindowFit() 
                     when(Count > M   Count = 0    Count2++   M=1.5*M)
                      when( Count2 >7                     
                                axlUIWTimerRemove( ID )
                               Count = 0    Count2=0
                               if( axlUIYesNo("How about the graphic?\nIs it beautiful?" "Just for entertainment.") then
                                   axlUIConfirm(" Ha Ha Ha~~~")
                                   else
                                   axlUIConfirm(" Wu wu wu~~~")
                                 );if
                               );when
                   );procedure     

GraphicTest.il
  • Sign in to reply
  • Cancel
  • C Shiva
    C Shiva over 13 years ago

     Nice skill code leonlee. But there is no option to stop it.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • girish
    girish over 13 years ago

     I appreciate youridea !

    Making me more enthusiastic to learn skill coding  & to make different shapes ;-)

     

    Thanks

     Girish Kumar 

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • leonlee
    leonlee over 13 years ago

     To stop the routine,  the command is:

    axlUIWTimerRemove( ID )

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Cadence Guidelines

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information