Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 04/04/2022 in all areas

  1. Does your command nb run properly when entered in the command line?
    2 points
  2. Lots of macro options. The ^C^C cancels both current command and selection. From the link I posted above a ( )space or (;)semicolon issues enter in a macro separating actions in the macro. The or function evaluates the expressions from left to right, looking for a non-nil expression so if C:bn is already defined and returns True the next expression (load "bnlispfile.lsp") isn't evaluated (reloaded). ^C^C(or C:bn (load "bnlispfile.lsp"));bn If you wanted your lisp to work with preselected objects you would need to leave out the ^C^C. To test if there is a current command you would need to use DIESEL in the macro. For example I replaced the Ctrl+A macro in the CUI Keyboard Shortcuts → Shortcut Keys ^C^C_ai_selall which cancels any active commands (not always what you want it to do) with $M=$(if,$(getvar,cmdactive),_all,^P_ai_selall ^P) Now Ctrl+A uses the selection option _all while in an active command and _ai_selall when there isn't an active command so it selects all either way.
    1 point
  3. 1 point
  4. Remove the _underscore. About Special Control Characters in Command Macros https://help.autodesk.com/view/ACD/2023/ENU/?guid=GUID-DDDB6E26-75E1-4643-8C6A-BEAEBA83A424 _ Translates commands and options that follow from the localized name to the global name. As bn is a command defined by lisp it wouldn't have a localized name. Assuming the lisp has been loaded in the current drawing ^C^Cbn; should work.
    1 point
  5. Well, there's your problem. Open AutoCAD first, then open the drawing from within the app. When you open a drawing via the operating system, things happen that you may not want.
    1 point
×
×
  • Create New...