element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • 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
      • Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Vietnam
      • 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
  • Settings
Autodesk EAGLE
  • Products
  • More
Autodesk EAGLE
EAGLE User Support (English) Determine OS from within ULP
  • Blog
  • Forum
  • Documents
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Autodesk EAGLE to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 13 replies
  • Subscribers 178 subscribers
  • Views 1153 views
  • Users 0 members are here
Related

Determine OS from within ULP

Former Member
Former Member over 14 years ago

Greetings

 

I'm developing my first ULP that needs to react differently depending on the

operating system.

What is considered the preferred method of determining the Operating System

from within a ULP?

 

Any advice appreciated.

Thanks

Warren

 

 

 

  • Sign in to reply
  • Cancel
Parents
  • Former Member
    Former Member over 14 years ago

    "Warren Brayshaw" <warrenbrayshaw@paradise.net.nz> wrote in message

    news:iudv2t$ucs$1@cheetah.cadsoft.de...

    Greetings

     

    I'm developing my first ULP that needs to react differently depending on

    the

    operating system.

    What is considered the preferred method of determining the Operating

    System

    from within a ULP?

     

    May I ask why you need to detect this? Depending on what you try to do,

    there could be alternative solutions..

     

     

     

     

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • Former Member
    Former Member over 14 years ago

    "Warren Brayshaw" <warrenbrayshaw@paradise.net.nz> wrote in message

    news:iudv2t$ucs$1@cheetah.cadsoft.de...

    Greetings

     

    I'm developing my first ULP that needs to react differently depending on

    the

    operating system.

    What is considered the preferred method of determining the Operating

    System

    from within a ULP?

     

    May I ask why you need to detect this? Depending on what you try to do,

    there could be alternative solutions..

     

     

     

     

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Children
  • Former Member
    Former Member over 14 years ago in reply to Former Member

    Morten Leikvoll wrote:

     

    May I ask why you need to detect this? Depending on what you try to

    do, there could be alternative solutions..

     

     

    The need is to provide the correct formatting for the strings passed with

    the system() ULP command and the formatting of batch files created by the

    ULP and used by the OS script processors.

    When the system() command is involved it appears to be most common (easier)

    for a ULP to be crafted solely for use with Windows or Linux/Mac. I wish to

    make a ULP that will work in both environments hence the formatting needs to

    be appropriate for the OS in use.

     

    Warren

     

     

     

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 14 years ago in reply to Former Member

    "Warren Brayshaw" <warrenbrayshaw@paradise.net.nz> wrote in message

    news:iuhjh9$8o3$1@cheetah.cadsoft.de...

    Morten Leikvoll wrote:

     

    >> May I ask why you need to detect this? Depending on what you try to

    >> do, there could be alternative solutions..

    >

    The need is to provide the correct formatting for the strings passed with

    the system() ULP command and the formatting of batch files created by the

    ULP and used by the OS script processors.

    When the system() command is involved it appears to be most common

    (easier)

    for a ULP to be crafted solely for use with Windows or Linux/Mac. I wish

    to

    make a ULP that will work in both environments hence the formatting needs

    to

    be appropriate for the OS in use.

     

    So I guess a platform dependant batch file that takes the same arguments on

    all platforms could sort the case?

    I guess you can make linux autorun a xxx.bat file (not sure bout mac), and

    windows can for sure.

    I tried creating a file called test.bat on both (set the x flag on linux),

    and I could run them both with "./test.bat" from shell's (I haven't got

    linux eagle install, so you may want to try it)

     

     

     

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 14 years ago in reply to Former Member

    Morten Leikvoll wrote:

    "Warren Brayshaw" <warrenbrayshaw@paradise.net.nz> wrote in message

    news:iuhjh9$8o3$1@cheetah.cadsoft.de...

    >> Morten Leikvoll wrote:

    >>

    >>> May I ask why you need to detect this? Depending on what you try to

    >>> do, there could be alternative solutions..

    >>

    >>

    >> The need is to provide the correct formatting for the strings passed

    >> with the system() ULP command and the formatting of batch files

    >> created by the ULP and used by the OS script processors.

    >> When the system() command is involved it appears to be most common

    >> (easier)

    >> for a ULP to be crafted solely for use with Windows or Linux/Mac. I

    >> wish to

    >> make a ULP that will work in both environments hence the formatting

    >> needs to

    >> be appropriate for the OS in use.

     

    So I guess a platform dependant batch file that takes the same

    arguments on all platforms could sort the case?

    I guess you can make linux autorun a xxx.bat file (not sure bout

    mac), and windows can for sure.

    I tried creating a file called test.bat on both (set the x flag on

    linux), and I could run them both with "./test.bat" from shell's (I

    haven't got linux eagle install, so you may want to try it)

     

    Thanks for the input Morten:

    The thread has moved away from my request for methods to detect the

    operating system from within a ULP.

    Further ideas from those with expeience with achieving this would be

    appreciated.

     

    Warren

     

     

     

     

     

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 14 years ago in reply to Former Member

    "Warren Brayshaw" <warrenbrayshaw@paradise.net.nz> wrote:

    Morten Leikvoll wrote:

    >> "Warren Brayshaw" <warrenbrayshaw@paradise.net.nz> wrote in message

    >> news:iuhjh9$8o3$1@cheetah.cadsoft.de...

    >>> Morten Leikvoll wrote:

    >>>

    >>>> May I ask why you need to detect this? Depending on what you try to

    >>>> do, there could be alternative solutions..

    >>>

    >>>

    >>> The need is to provide the correct formatting for the strings passed

    >>> with the system() ULP command and the formatting of batch files

    >>> created by the ULP and used by the OS script processors.

    >>> When the system() command is involved it appears to be most common

    >>> (easier)

    >>> for a ULP to be crafted solely for use with Windows or Linux/Mac. I

    >>> wish to

    >>> make a ULP that will work in both environments hence the formatting

    >>> needs to

    >>> be appropriate for the OS in use.

    >>

    >> So I guess a platform dependant batch file that takes the same

    >> arguments on all platforms could sort the case?

    >> I guess you can make linux autorun a xxx.bat file (not sure bout

    >> mac), and windows can for sure.

    >> I tried creating a file called test.bat on both (set the x flag on

    >> linux), and I could run them both with "./test.bat" from shell's (I

    >> haven't got linux eagle install, so you may want to try it)

     

    Thanks for the input Morten:

    The thread has moved away from my request for methods to detect the

    operating system from within a ULP.

    Further ideas from those with expeience with achieving this would be

    appreciated.

     

    Yea I know I branced off the main topic, but when I thought about it a

    couple of times I lean to that the optimal place to do it is outside eagle.

    Sounds cleanest to me in any case.

     

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • 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 © 2025 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