Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 11/07/2024 in all areas

  1. Please use Code Tags in the future. (<> in the editor toolbar)
    1 point
  2. Note that the 'report' that you are describing is merely the value returned by the (defun) expression - per the documentation: This is no different to typing (+ 1 1) at the command line and observing 2 as the return value of the + function; that is, there is nothing special about running a custom command and seeing a return value versus evaluating an arbitrary LISP expression and seeing a return value. Given this, the documentation for the (princ) function reveals why two outputs are observed: Hence, when typing (princ "Hello World!") to the command line, you'll obtain: Command: (princ "Hello World!") Hello World!"Hello World!" The first being the operation (aka side effect) of the (princ) function, the second being the value returned by the (princ) function. Now, given that (defun) returns the value returned by the last evaluated expression, and (princ) returns the value of the evaluated expression, if you define a function such as: (defun c:test ( ) (princ "Hello World!") ) You will obtain the following output: Command: TEST Hello World!"Hello World!" Since (princ) has printed the string to the command line and returned "Hello World!" to the (defun) expression, and the (defun) expression has in turn returned "Hello World!" as its own return value. Therefore, by modifying the function definition to: (defun c:test ( ) (princ "Hello World!") (princ) ) The first (princ) expression still returns "Hello World!" to the (defun) expression, but it is no longer the last evaluated expression - the second (princ) with no arguments will return a null symbol to the (defun) expression, which will then be returned by the (defun) expression, resulting in no visible output to the command line.
    1 point
  3. @CivilTechSource you dont need to start a new topic this request can be added to your other post. Admin please merge into other post. Just a comment as your using multi if's it is probably better to start coding using a COND.
    1 point
  4. You are out to 283 posts so it is time you started to have a go at making lisps. I have supplied the "change the mtext", you need to add the ssget, a repeat and check does foundstr=oldstr if yes then change foundstr.
    1 point
  5. Hi @CivilTechSource, You need to add a (princ) (choose one of these): - the first one you can add (princ) inside of each "progn" after (princ "\nOhhhh.....) and (princ "\nAll.....) - the second one you can add (princ) after "if" statement, before or after ";----" in your code. Adding a (princ) you will get a "clean" output in command line.
    1 point
  6. I've now incorporated this feature into Version 1.1.
    1 point
  7. Your structural drawing is in Model Space while your title block/border and viewport are in Paper Space. Am I right on both counts? If so, you can set the viewport scale to 1/4"=1'-0" and your building should fit within its confines. The scale factor I mention is fairly typical of architectural drawings. If you are satisfied with the results make sure to lock the viewport scale so you don't inadvertently change it.
    1 point
  8. If you don't understand the code ask, most people will add explanations line by line. Explaining what is going on. Big list of VLA functions attached then just google what your maybe trying to understand. Sorry no author name in the Autolisp functions. The_Visual_LISP_Developers_Bible.pdf Books such as by Reonaldo Togeros, can get on Kindle as Ebook nice thing is can copy and paste code. List of all vl commands.txt AUTOLISP FUNCTIONS CATOGRIZATION.pdf
    1 point
  9. LISP I wrote to include the common filters (I still use QSelect, but generally this si all I need and it's a lot faster than the QSelect menu)... eg. Command: ft Filter choice: [block/Color/Entity/Layer/linetYpe] <Layer>: FilteredSelection.LSP
    1 point
×
×
  • Create New...