• 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 Scripting - Skill
  3. Skill : Draw Line 17.2 works , 17.4 doesn't

Stats

  • Replies 1
  • Subscribers 17
  • Views 1904
  • Members are here 0
More Content

Skill : Draw Line 17.2 works , 17.4 doesn't

Sashkola
Sashkola over 5 years ago

Hi , 

I am sharing with you some simple skill script that draw line in user layer :

axlCmdRegister("DrawLine" 'DrawLine)
procedure(DrawLine()
   layer_name = "substrate geometry/userlayer"
   mypopup = axlUIPopupDefine(nil '(
      ("Done" "axlDBTransactionCommit(mark), axlFinishEnterFun()")
      ("Oops" "axlDBTransactionOops(mark), when(zerop(--oopsNum)")
      ("Cancel" "axlDBTransactionRollback(mark), axlCancelEnterFun()")
      ("MENU_SEPARATOR", nil)))
   axlUIPopupSet( mypopup)
   ; Clear the dynamic buffer
   axlClearDynamics()

   if(axlLayerGet(layer_name) != nil then
      if(axlIsVisibleLayer(layer_name) == nil then
         axlVisibleLayer(layer_name,t)
         axlVisibleUpdate(t)
      );End if
   else
      if(axlLayerGet("substrate geometry") == nil then
         layer_name = "board geometry/userlayer"
         axlLayerCreateNonConductor(layer_name)
         axlVisibleLayer(layer_name,t)
         axlVisibleUpdate(t)
      else
         axlLayerCreateNonConductor(layer_name)
         axlVisibleLayer(layer_name,t)
         axlVisibleUpdate(t)
      );End if
   );End if

   ; Clear mypath to nil, then loop gathering user picks:
   mypath = nil
   mark = axlDBTransactionStart()
   flag = t
   allP = list(nil)
   seg1 = nil
   seg2 = nil
   while( (mypath = axlEnterPath(?lastPath mypath))
      if(flag == t then
         p = axlDBCreatePath(mypath, layer_name)
         seg1 = car(car(car(p))->segments)
         seg2 = car(cdr(car(car(p))->segments))
         path = axlPathStart( list(car(seg1->startEnd)) , 0)
         axlPathLine( path , 0 , car(cdr(seg1->startEnd)))
         if(seg2 then
            axlPathLine( path , 0 , car(cdr(seg2->startEnd)))
         );end if
         flag = nil
      else
         p = axlDBCreatePath(mypath, layer_name)
         seg1 = car(car(car(p))->segments)
         seg2 = car(cdr(car(car(p))->segments))
         axlPathLine( path , 0 , car(cdr(seg1->startEnd)))
         if(seg2 then
            axlPathLine( path , 0 , car(cdr(seg2->startEnd)))
         );end if
      );end if
      allP = cons(car(car(p)) allP)
   );Loop
   axlDBCreatePath(path, layer_name)
   forall( x allP axlDeleteObject(x))
);End procedure

Is anyone can help to understand why this script can work with 16.5/16.6/17.2 and doesn't work with 17.4 ?

To be more informative in 17.4 this script behaves differently , when i am trying to draw line i can't zoom in/out ,i can't use my shortcuts to snap it on segment/middle/edge , it's like it's waiting only for next X/Y user click , all other functions just disabled .

Thanks .

  • Sign in to reply
  • Cancel
Parents
  • Sashkola
    Sashkola over 5 years ago

    Update : then this script finnish, all shortcuts that i tryed to use in middle of this script shots at once , seems like this script collects all shortcuts that i tryed to use and do them then script done.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • Sashkola
    Sashkola over 5 years ago

    Update : then this script finnish, all shortcuts that i tryed to use in middle of this script shots at once , seems like this script collects all shortcuts that i tryed to use and do them then script done.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Children
No Data
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