• 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. Need a skill code to report text block settings from pcb...

Stats

  • Replies 10
  • Subscribers 17
  • Views 14832
  • Members are here 0
More Content

Need a skill code to report text block settings from pcb editor.

RagavanT
RagavanT over 6 years ago

Hi Experts,

I was trying to generate a report about text block from PCB editor and output file name should be on footprint name.

Thanks.

  • Cancel
  • Sign in to reply
Parents
  • eDave
    eDave over 6 years ago

    It's difficult to understand what you are asking.

    Does this help:

    foreach(def, axlDBGetDesign() ->symdefs
      p = axlDMOpenFile("MISC", strcat(def ->name, ".txtBlkRpt"), "w")
      fprintf(p, "%s", buildString(unique(setof(obj, def ->children, obj ->objType == "text") ~>textBlock)))
      axlDMClose(p)
    )

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • RagavanT
    RagavanT over 6 years ago in reply to eDave

    Hi Dave,

    Thanks for your reply. I am new to skill code, I tried to code extract text block report from the footprint(xxx(fpname)_xxxx(timestamp).txt. Here I want output file should be in the name of footprint name and timestamp. and I don't have an idea to include time and footprint name into an output report file. here the code i composed. please help me to achieve desired code. 

    axlCmdRegister("textblkcheck" 'TextBlockcheck)
    defun( TextBlockcheck ()
    p = axlDMOpenLog("textblkcheck_Report")
    fprintf(p, "textblkcheck_Report\n\n", nil)
    ;-----------------------------------------------------------------------------
    fprintf(p,"TextBlock:\n\n", nil )
    q=axlGetParam("paramTextBlock:1")
    txtBlk_name = q->Name ; get the name field
    txtBlk_photo = q->PhotoWidth ; get the photoWidth field
    txtBlk_height = q->Height ; get the height filed
    txtBlk_width = q->Width ; get the width filed
    txtBlk_linespace = q->LineSpace ; get the lineSpace filed
    txtBlk_charSpace = q->CharSpace ; get the charSpace filed
    fprintf(p, "name:%L TxtBlk_Photo:%L txtBlk_height:%L txtBlk_width:%L txtBlk_linespace:%L txtBlk_charSpace:%L", txtBlk_name, txtBlk_photo, txtBlk_height, txtBlk_width, txtBlk_linespace, txtBlk_charSpace)

    axlDMClose(p)
    axlUIViewFileCreate("textblkcheck_Report.log" sprintf(nil, "REPORT", nil), nil)
    axlVisibleDesign(t)
    axlMsgPut("Checking completed.See report.")
    ); end defun

     Regards,

    Ragavan T

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • RagavanT
    RagavanT over 6 years ago in reply to eDave

    Skill > axlGetParam("paramTextBlock:1")
    param:1194166C

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • eDave
    eDave over 6 years ago in reply to RagavanT

    Type the whole command

    axlGetParam("paramTextBlock:1") ->??

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • RagavanT
    RagavanT over 6 years ago in reply to eDave

    Skill > axlGetParam("paramTextBlock:1") ->??
    (objType "paramTextBlock" width 0.4064 photoWidth
    0.0254 name "1" lineSpace 0.7874
    height 0.635 charSpace 0.1524

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • eDave
    eDave over 6 years ago in reply to RagavanT

    So if you copied my code correctly it should work

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

    defun( TextBlockcheck ()
    p = axlDMOpenLog(lsprintf("%s_textblkcheck_Report", axlCurrentDesign()))
    fileName = get_filename(p)
    fprintf(p, "textblkcheck_Report\n\n")
    ;-----------------------------------------------------------------------------
    fprintf(p,"TextBlock:\n\n")
    q=axlGetParam("paramTextBlock:1")
    txtBlk_name = q->name ; get the name field *** Case sensitive ***
    txtBlk_photo = q->photoWidth ; get the photoWidth field
    txtBlk_height = q->height ; get the height filed
    txtBlk_width = q->width ; get the width filed
    txtBlk_linespace = q->lineSpace ; get the lineSpace filed
    txtBlk_charSpace = q->charSpace ; get the charSpace filed
    fprintf(p, "name:%L TxtBlk_Photo:%L txtBlk_height:%L txtBlk_width:%L txtBlk_linespace:%L txtBlk_charSpace:%L", txtBlk_name, txtBlk_photo, txtBlk_height, txtBlk_width, txtBlk_linespace, txtBlk_charSpace)

    axlDMClose(p)
    axlUIViewFileCreate(fileName, "REPORT", nil)
    axlVisibleDesign(t)
    axlMsgPut("Checking completed.See report.")
    ); end defun

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • eDave
    eDave over 6 years ago in reply to eDave

    defun( TextBlockcheck ()
    p = axlDMOpenLog(lsprintf("%s_textblkcheck_Report", axlCurrentDesign()))
    fileName = get_filename(p)
    fprintf(p, "textblkcheck_Report\n\n")
    ;-----------------------------------------------------------------------------
    fprintf(p,"TextBlock:\n\n")
    q=axlGetParam("paramTextBlock:1")
    txtBlk_name = q->name ; get the name field *** Case sensitive ***
    txtBlk_photo = q->photoWidth ; get the photoWidth field
    txtBlk_height = q->height ; get the height filed
    txtBlk_width = q->width ; get the width filed
    txtBlk_linespace = q->lineSpace ; get the lineSpace filed
    txtBlk_charSpace = q->charSpace ; get the charSpace filed
    fprintf(p, "name:%L TxtBlk_Photo:%L txtBlk_height:%L txtBlk_width:%L txtBlk_linespace:%L txtBlk_charSpace:%L", txtBlk_name, txtBlk_photo, txtBlk_height, txtBlk_width, txtBlk_linespace, txtBlk_charSpace)

    axlDMClose(p)
    axlUIViewFileCreate(fileName, "REPORT", nil)
    axlVisibleDesign(t)
    axlMsgPut("Checking completed.See report.")
    ); end defun

    • 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