<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to call a command and define it's variables? in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-call-a-command-and-define-it-s-variables/m-p/9473476#M75444</link>
    <description>&lt;P&gt;All true, but he could use (vlax-add-cmd) to make an AutoCAD command that could accept input just like the (command) function, AND shorten the name.&lt;/P&gt;</description>
    <pubDate>Mon, 27 Apr 2020 14:04:18 GMT</pubDate>
    <dc:creator>john.uhden</dc:creator>
    <dc:date>2020-04-27T14:04:18Z</dc:date>
    <item>
      <title>How to call a command and define it's variables?</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-call-a-command-and-define-it-s-variables/m-p/9471984#M75439</link>
      <description>&lt;P&gt;I use a lot of other people's lisp, they're all wonderful and I appreciate it greatly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I never modify other people's lisp because I respect all the hard work that needs to be put in, but I sometimes simplify it's command to make it easier to use for myself.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example I'm using a Lisp called BreakObjects21.lsp by Charles Alan Butler right now, it has a great function call c:BreakAll that breaks all lines at intersection, and it give you the option to enter a "gap" value.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However BreakAll is too long for me to type, and the "gap" I don't use much, so I create my own short Lisp to try to make it easier and it goes like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(LOAD "C:/ACAD/LSP/BreakObjects21.lsp")&lt;/P&gt;&lt;P&gt;(DEFUN C:BA()&lt;BR /&gt;(C:BREAKALL "0")&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I will hoping to simplify c:BreakAll to c:BA, and skip the "gap" option, but instead I get at prompt saying "too many arguments" on the command line, what am I doing wrong?&lt;/P&gt;</description>
      <pubDate>Sun, 26 Apr 2020 22:37:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-call-a-command-and-define-it-s-variables/m-p/9471984#M75439</guid>
      <dc:creator>septembertiger168</dc:creator>
      <dc:date>2020-04-26T22:37:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to call a command and define it's variables?</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-call-a-command-and-define-it-s-variables/m-p/9472037#M75440</link>
      <description>&lt;P&gt;(defun c:Breakall..) is designed as a command function i.e. to run like a command from the command line just by typing its name Breakall. It has the special characters "c:" before its name that allows this (and only this) and therefore like all commands it cannot take an argument.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The lisp would require reworking to be able to accept an argument.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you still want to shorten the name remove the "0". i.e. (defun c:BA () (c:breakall))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;</description>
      <pubDate>Sun, 26 Apr 2020 23:18:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-call-a-command-and-define-it-s-variables/m-p/9472037#M75440</guid>
      <dc:creator>dlanorh</dc:creator>
      <dc:date>2020-04-26T23:18:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to call a command and define it's variables?</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-call-a-command-and-define-it-s-variables/m-p/9472332#M75441</link>
      <description>&lt;P&gt;try this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(defun c:ba ( / )
  (vl-load-com)
  (vla-sendcommand
    (vla-get-activedocument
      (vlax-get-acad-object)
    )
    "BREAKALL 0 "
  )
  (princ)
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Apr 2020 04:45:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-call-a-command-and-define-it-s-variables/m-p/9472332#M75441</guid>
      <dc:creator>phanaem</dc:creator>
      <dc:date>2020-04-27T04:45:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to call a command and define it's variables?</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-call-a-command-and-define-it-s-variables/m-p/9472459#M75442</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/8317642"&gt;@septembertiger168&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;also you can invoke the command from a menu macro (like a toolbar)&lt;/P&gt;&lt;P&gt;^C^CBREAKALL 0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;when calling a command from menu macro (or script file) you can supply command options or a value in advance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Moshe&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Apr 2020 06:32:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-call-a-command-and-define-it-s-variables/m-p/9472459#M75442</guid>
      <dc:creator>Moshe-A</dc:creator>
      <dc:date>2020-04-27T06:32:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to call a command and define it's variables?</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-call-a-command-and-define-it-s-variables/m-p/9472926#M75443</link>
      <description>&lt;P&gt;I have found the latest version of CAB's brealobjects23.lsp, and have inserted a new command C:BA that will only ask for a selection set and then break all objects with a zero gap. (attached)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this is what you required.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Apr 2020 10:48:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-call-a-command-and-define-it-s-variables/m-p/9472926#M75443</guid>
      <dc:creator>dlanorh</dc:creator>
      <dc:date>2020-04-27T10:48:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to call a command and define it's variables?</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-call-a-command-and-define-it-s-variables/m-p/9473476#M75444</link>
      <description>&lt;P&gt;All true, but he could use (vlax-add-cmd) to make an AutoCAD command that could accept input just like the (command) function, AND shorten the name.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Apr 2020 14:04:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-call-a-command-and-define-it-s-variables/m-p/9473476#M75444</guid>
      <dc:creator>john.uhden</dc:creator>
      <dc:date>2020-04-27T14:04:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to call a command and define it's variables?</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-call-a-command-and-define-it-s-variables/m-p/9490608#M75445</link>
      <description>&lt;P&gt;Thank you all for your answers, I was able to get it to work with the codes provided in the answer. But I don't understand all the "vl" and "vla" commands, I'm so new to coding I need to study what these commands mean.&lt;/P&gt;</description>
      <pubDate>Mon, 04 May 2020 17:06:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-call-a-command-and-define-it-s-variables/m-p/9490608#M75445</guid>
      <dc:creator>septembertiger168</dc:creator>
      <dc:date>2020-05-04T17:06:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to call a command and define it's variables?</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-call-a-command-and-define-it-s-variables/m-p/9491683#M75446</link>
      <description>All that vl- stuff is Visual Lisp which uses something called ActiveX.  It&lt;BR /&gt;is object oriented, which means a system that can treat AutoLisp entities&lt;BR /&gt;as vla-objects that have alphabetic properties instead of DXF codes, and it&lt;BR /&gt;has many methods for handling objects not otherwise available in plain&lt;BR /&gt;AutoLisp.  The neat part is that it can be used in conjunction with&lt;BR /&gt;old-time AutoLisp functions like mapcar and lambda.  It may be daunting at&lt;BR /&gt;first, but once you start thinking in terms of objects and properties, it&lt;BR /&gt;becomes quite logical.  To help you learn, you must study the VBA help.&lt;BR /&gt;Just remember that methods are like verbs and objects are, well, objects;&lt;BR /&gt;you know... lines, arcs, circles, polylines, etc.&lt;BR /&gt;There will be an open-book quiz on Friday. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;</description>
      <pubDate>Tue, 05 May 2020 00:08:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-call-a-command-and-define-it-s-variables/m-p/9491683#M75446</guid>
      <dc:creator>john.uhden</dc:creator>
      <dc:date>2020-05-05T00:08:05Z</dc:date>
    </item>
  </channel>
</rss>

