element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Members
    Members
    • Achievement Levels
    • Benefits of Membership
    • Feedback and Support
    • Members Area
    • Personal Blogs
    • What's New on element14
  • Learn
    Learn
    • eBooks
    • Learning Center
    • Learning Groups
    • STEM Academy
    • Webinars, Training and Events
  • Technologies
    Technologies
    • 3D Printing
    • Experts & Guidance
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Arduino Projects
    • Design Challenges
    • element14 presents
    • Project14
    • Project Groups
    • Raspberry Pi Projects
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Or choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
Autodesk EAGLE
  • Products
  • More
Autodesk EAGLE
EAGLE User Chat (English) How to detect a 'usable' layer?
  • Blog
  • Forum
  • Documents
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Autodesk EAGLE requires membership for participation - click to join
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Suggested Answer
  • Replies 7 replies
  • Answers 3 answers
  • Subscribers 147 subscribers
  • Views 715 views
  • Users 0 members are here
Related

How to detect a 'usable' layer?

fatbeard
fatbeard over 3 years ago

running 5.12.0

Inside an ULP I want to know what layers in a board are available.

When I loop through the layers in a board with an ULP (like: board(B) B.layers(L) {some code using L} ) I get all signal layers; the layer list in the board editor only shows the ones defined in the DRC.The ones not defined in the DRC are reported as hidden to the ULP.

When a script tries to access one of the layers not listed in the editor, an error pops up stating that that layer is not available (which is IMO correct) and continues to use the next available layer.

 

Is there a way for an ULP to detect if a hidden layer is just hidden or not available at all, to prevent this from happening in a generated script?

  • Sign in to reply
  • Cancel
Parents
  • autodeskguest
    0 autodeskguest over 3 years ago

    Am 13.02.2020 um 22:09 schrieb leo potjewijd:

    running 5.12.0

    Inside an ULP I want to know what layers in a board are available.

    When I loop through the layers in a board with an ULP (like: board(B) B.layers(L) {some code using L} ) I get all signal layers (with 2-15 always marked as hidden); the layer list in the board editor only shows the ones defined in the DRC.

    When a script tries to access one of the layers not listed in the editor, an error pops up stating that that layer is not available (which is IMO correct) and continues to use the next available layer.

     

    Is there a way for an ULP to detect if a hidden layer is just hidden or not available at all, to prevent this from happening in a generated script?

     

    --

    To view any images and attachments in this post, visit:

    https://www.element14.com/community/message/288316

     

     

    Layers available depends on your license. In a professional license all

    layers (16) are available, but in your DRC setup you decide which of

    those are useable and which are hidden.

    In Standard and other Licensees amount of layers (and other things) are

    limited.

     

    --

    Mit freundlichen Grüßen / With best regards

     

    Joern Paschedag

     

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • fatbeard
    0 fatbeard over 3 years ago in reply to autodeskguest

    I know that (running full pro license), but how can an ULP distinghuish between a usable and an unusable layer?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Reply
  • fatbeard
    0 fatbeard over 3 years ago in reply to autodeskguest

    I know that (running full pro license), but how can an ULP distinghuish between a usable and an unusable layer?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Children
  • WarrenBrayshaw
    0 WarrenBrayshaw over 3 years ago in reply to fatbeard

    OK, replying again.

    Assuming you want to get the  DRC layer setup e.g. (1*16) or maybe its (1+2*15+16)

    It lives in the .brd file and you have to parse the board file to extract it.

    This is easier in later versions because they are human readable. v5.12 is binary, but it appears you get lucky. You can see plain text in some of it and I can see the info you need.

     

    Open the board file in a text editor and search for </language

    A few characters after that you will see the familiar DRC layer setup e.g. (1+2*15+16)

     

    HTH

    Warren

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2023 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube