Need help with a button working in ACAD but noy BricsCAD

I have this on a button
^C^CDel_Pagesetups;^C^C.-PSETUPIN "PageSetups.dwg" "*";Show_Pagesetups 
Works fine in ACAD 2006
but in V16 BriscCAD it pops up a file dialog window wanting me to pick the file.
No problem with the Delete of the page setups.

[code](defun c:del_pagesetups    (/)
  (vlax-map-collection
    (vla-get-Plotconfigurations (vla-get-ActiveDocument (vlax-get-Acad-Object)))
    'vla-delete
  )
  (princ)
)[/code]

Comments

  • It would seem that -PSETUPIN in BricsCAD isn't defaulting to the command line, which it should. Fortunately you can workaround by either calling it in a SCRIPT, or by using some LISP.

    e.g.
    [code]^c^c^p(acet-sysvar-set '("EXPERT" 2))(command "._-PSETUPIN" "PageSetups.dwg" "*")(acet-sysvar-restore)^p[/code]

    Setting EXPERT = 2 will redefine any existing page setups with the ones from the chosen file.

    Regards,
    Jason Bourhill

  • Thanks Jason I'll give that a try.
  • Hi Charles,

    No problem. A pleasure to be of help to someone who has been so generous themselves in sharing their knowledge.

    BTW in case you're wondering why I would use ACET functions (something that polarises AutoLISP users), BricsCAD LISP has rolled out native support for most of these functions. What is more they are documented, and you can get support if you have any issues with them, just like any other LISP function. For more information on BricsCAD LISP I suggest downloading the LISP developers support package.

    Regards,
    Jason Bourhill CAD Concepts
  • Just getting my feet wet with BricsCAD. One foot in ACAD one in BricsCAD but making the leap.
    Thanks for the tip, did the down load tonight.

This discussion has been closed.