• 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. axlGetAttachment adds a NUL character at the end of the...

Stats

  • Replies 2
  • Subscribers 159
  • Views 12742
  • Members are here 0
More Content

axlGetAttachment adds a NUL character at the end of the file

VijayVela
VijayVela over 12 years ago

Hi all,
I have a problem with the axlGetAttachment function.
This is what I do...

a=axlGetAttachment("testFile.txt" 'file)
renameFile(a->data "MyTestFile.txt")        - this is to get the file saved into the working folder
p_myFile = infile("MyTestFile.txt") 
while(_text=lineread(p_myFile )
     println(_text)
); end while
close(p_myFile)

The problem is, when the attachement if fetched back from the database, it adds a NUL character at the end of the file.
In notepad++, it shows as a NUL and in Wordpad it shows as a blankspace
When the script above is run, it halts with an error:-

(("REMARKS_AR1" "testing this out,,"))
E-
E- SYNTAX ERROR found at line 6 column 1 of file MyTestFile.txt
E- *Error* lineread/read: syntax error encountered in input
ERROR

Any idea on how to handle this?

Thanks


Vijay Anandh Vela

  • Sign in to reply
  • Cancel
  • eDave
    eDave over 12 years ago

    Maybe try:

    while(gets(_text p_myFile )

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • VijayVela
    VijayVela over 12 years ago

    Works great now...
    Thanks Dave...


    Regards,
    Vijay Anandh Vela

    • 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