Search code examples
autocadautocad-pluginautolisp

How to Use AEBALLON command via AUTOLISP in ACADE 2016


In my current task I need to add Balloon to particular block in AutoCAD electrical 2016 using AEBALLOON command through Auto lisp, Does any one know how "AEBALLOON command send to AutoCAD Electrical 2016 through auto lisp"

My project stuck here thanks in advance.


Solution

  • AutoCAD Electrical is extended version of plan AutoCAD to draw electrical drawings.

    Electrical entity like, Balloon, Foot-Print, BOM-Tables, Tittle Block, has reference with each other which stored in the form of XREF, XDATA or Attribute.

    Also most of AutoCAD electrical command is written in AutoLISP, like AEBALLOON AERESEQUENCE.
    All this commands run as per programmer written to it. so we can not pass any parameter as per our requirement.

    Let's consider AEBALLOON command after running this command there is two option
    1. select entity to add Balloon
    2.select last entity by pressing s
    but we can not pass any random entity as per our requirement.

    but In Plain AutoCAD command we can pass parameter as per our requirement.

    That's mean we can not send parameter to any AutoCAD electrical command via Auto-lisp or other programming Language.

    But here is tricky solution to add Balloon.
    1. Insert Balloon block as per location.
    2. VIA_WD_BALLPTR VIA_WD_HDL add those XREF to inserted balloon.(Not only this two there are more so study relation between this XREF of balloon with balloon part)
    3. See impact of added data which is as per rule. (This rule you need to find your own like XREF value of VIA_WD_BALLPTR is not same to other entity in entire drawing.)

    (Above process need long and carefully written function otherwise it crash AutoCAD. after trial and error, function can be corrected.)