• 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. Pdf_out using axlRunBatchDBProgram

Stats

  • Replies 5
  • Subscribers 19
  • Views 11235
  • Members are here 0
More Content

Pdf_out using axlRunBatchDBProgram

ENEGUE
ENEGUE over 6 years ago

Hi Guys,

I try to mirror some of the artwork film and generate PDF.

but the output PDF does not mirror even the "mirrored setting" in artwork film already set.

 

If manually do everything(file>export>pdf), without save the design, i able to print the pdf according to mirror setting.....must be something wrong in coding.

unless i add in "axlsavedesign", only i got the result with mirror.

Anyway to modifier the coding without add in "axlsavedesign"? =(

Eugene

  • Cancel
  • Sign in to reply
  • ePeter
    ePeter over 6 years ago

    Hi enegue,

    I don't that is possible.

    I do also a save design to a temporary design file before generating the pdf files (you even don't have to give it a .brd extension).

    This is a part of the code which I use :

    axlSaveDesign(?design "tmp_design_for_pdf.tmp", ?mode "nocheck", ?noMru t, ?noConfirm t, ?writeModel t)

    dummy=strcat("pdf_out tmp_design_for_pdf.tmp -o \"" axlCurrentDesign() "\"-114.PDF -p -x -P " films_to_plot)

    axlRunBatchDBProgram("Generating Layout sheets 114." dummy)

    deleteFile("tmp_design_for_pdf.tmp" )

    Peter

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • ENEGUE
    ENEGUE over 6 years ago in reply to ePeter

    Thanks Peter,

    I like your solution..=)

    Eugene

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • BhuvanHL1
    BhuvanHL1 over 2 years ago in reply to ePeter

    Hello Peter,

    I am the beginner for the coding field.

    Kindly help to provide the full code to generate both mirrored and non mirrored pdf.

    I wanted to create for the below fiels

    paste mask top(PMT), silkscreen top(SST), soldermask top(SMT) (non Mirrored file)

    paste mask bottom(PMB), silkscreen bottom(SSB), soldermask bottom(SMB) (Mirrored file)

     

    Thanks in advance,

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • ePeter
    ePeter over 2 years ago in reply to BhuvanHL1

    Hi Bhuvan,

    When you have default naming for your Artwork films you can do the following ,

    Get a list of artworks

    art_films = axlGetParam("artwork")->groupMembers

    Loop through the artwork films

    foreach(film art_films
    ; get the parameters/settings of the artwork
    filmparams = axlGetParam(strcat("artwork:" film))

    ; you can put all into a variable if you want with :

    f_name=filmparams->name
    f_rotation=filmparams->rotation
    f_offset=filmparams->offset
    f_undefineLineWidth=filmparams->undefineLineWidth
    f_shapeBoundingBox=filmparams->shapeBoundingBox
    f_negative=filmparams->negative
    f_mirrored=filmparams->mirrored
    f_fullContact=filmparams->fullContact
    f_suppressUnconnectPads=filmparams->suppressUnconnectPads
    f_drawMissingPadApertures=filmparams->drawMissingPadApertures
    f_useApertureRotation=filmparams->useApertureRotation
    f_suppressShapeFill=filmparams->suppressShapeFill
    f_vectorBasedPad=filmparams->vectorBasedPad
    f_drawHolesOnly=filmparams->drawHolesOnly
    f_domains=filmparams->domains
    f_ipc2581=filmparams->ipc2581
    f_objType=filmparams->objType
    f_sequence=filmparams->sequence
    f_groupMembers=filmparams->groupMembers
    f_nChildren=filmparams->nChildren

    ; Optional create a new name for your film
    f_name=strcat("pdf_" f_name)
    ;new film sequence
    sequence_new_films=f_sequence+100

    ; check if the artwork name contains your critiria
    if(index(f_name, "PMB") || index(f_name, "PMB") || index(f_name, "SMB") then
    f_mirrored=t
    else
    f_mirrored=nil
    )

    ;create the films
    axlFilmCreate( f_name
    ?negative f_negative
    ?undefineLineWidth f_undefineLineWidth
    ?sequence sequence_new_films
    ?rotation f_rotation
    ?xOffset car(f_offset)
    ?yOffset cdr(f_offset)
    ?shapeBoundingBox f_shapeBoundingBox
    ?mirrored f_mirrored
    ?fullContact f_fullContact
    ?suppressUnconnectPads f_suppressUnconnectPads
    ?drawMissingPadApertures f_drawMissingPadApertures
    ?useApertureRotation f_useApertureRotation
    ?suppressShapeFill f_suppressShapeFill
    ?vectorBasedPad f_vectorBasedPad
    ?drawHolesOnly f_drawHolesOnly
    ?domains f_domains
    ?ipc2581 f_ipc2581
    ?layers f_groupMembers
    )

    ; films to plot
    to_plot=strcat(to_plot " -f " f_name)
    ; newley created films
    plot_list=cons(f_name plot_list)


    )

    you have to save the design otherwise films wont be found

    axlSaveDesign(?design "tmp_design_for_pdf.tmp", ?mode "nocheck", ?noMru t, ?noConfirm t, ?writeModel t)

    if(length(to_plot)!=0 then
    axlMsgPut("Generating Assembly drawing.")
    dummy2=strcat("pdf_out tmp_design_for_pdf.tmp -o ASY-\"" core_number "\".pdf -p -x -P" to_plot)
    axlRunBatchDBProgram("Generating Assembly drawing", dummy2, ?noUnload t, ?silent nil, ?noProgress nil )
    ;axlShell(dummy2)
    else
    axlMsgPut("No Assembly drawings found.")
    )

    delete temp design file

    deleteFile("tmp_design_for_pdf.tmp" )

    ; delete added films
    axlMsgPut("One moment please : Cleanup of the artworks.")
    foreach(del_pdf plot_list
    if(del_pdf != "" then
    s=axlGetParam(strcat("artwork:" del_pdf))
    axlDeleteObject(s)
    ;axlMsgPut("Delete artwork : %s" del_pdf)
    else
    ;axlMsgPut("Empty artwork name.")
    )

    This should give you some ideas how this can be done.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • BhuvanHL1
    BhuvanHL1 over 2 years ago in reply to ePeter

    Thanks for your great guidance Peter... If  any assistance I will ping you again.

    • 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