Recent Posts

Pages: 1 ... 3 4 [5] 6 7 ... 10
41
BricsCAD Users / Re: Help with Macro: Set Current Layer + Start LISP
« Last post by CEHill on April 23, 2024, 10:29:55 AM »
This code is an attempt to start the AutoLISP file, FAST.lsp, that was available years ago on the CADALYST website.

As supplied, the FAST.lsp code does not include code to create/set a specific layer.

To ensure that the output of the FAST.lsp is placed on the desired layer, I would like to create a button macro that

1.) Sets the FASTENER layer as current and

2.) Runs the FAST.lsp program.

The code successfully sets the FASTENER layer as current.

It does not invoke the AutoLISP program, FAST.lsp.

I need help with the AutoLISP portion below.

Code - Auto/Visual Lisp: [Select]
  1. ^C^C^C-Layer;S;FASTENER;;(C:FAST)
42
BricsCAD Users / Re: Help with Macro: Set Current Layer + Start LISP
« Last post by JohnK on April 23, 2024, 10:04:02 AM »
^c^c means: cancel, cancel (or escape, escape).

(c:fast) means what?
43
AutoLISP (Vanilla / Visual) / Re: factorial of decimal number...
« Last post by JohnK on April 23, 2024, 09:59:33 AM »
NOTE: I haven't read up on the concept, but I noticed a difference from yours and the windows calculator.
Example: if I type 6.2! in the basic windows calculator I get: 1,050.31

Yes, there is difference, but whom shell I/we trust?

wait! what? ...the calculator program shipped with windows was vetted by professionals probably many times, so I guess to be brutal, I'd trust that program over one of us lispers. Do you have a link or a concept (interest peaked)?
44
BricsCAD Users / Re: Help with Macro: Set Current Layer + Start LISP
« Last post by CEHill on April 23, 2024, 09:52:44 AM »
Of course.

So, the portion of the code that invokes the LISP part of the code would be ^C^C(C:FAST)  ???


C.
45
AutoLISP (Vanilla / Visual) / Re: factorial of decimal number...
« Last post by ribarm on April 23, 2024, 09:45:09 AM »
NOTE: I haven't read up on the concept, but I noticed a difference from yours and the windows calculator.
Example: if I type 6.2! in the basic windows calculator I get: 1,050.31

Yes, there is difference, but whom shell I/we trust?
46
BricsCAD Users / Re: Help with Macro: Set Current Layer + Start LISP
« Last post by JohnK on April 23, 2024, 09:36:53 AM »
How would you do this "normally" (-i.e. macros, are made by just writing down the steps [commands] you'd type to accomplish a task)?

1. Type: "-la"
2. Type: "set"
3. Type: "Fastner"
4. Type: <ENTER>
5. Type: "-i"
...
47
AutoLISP (Vanilla / Visual) / Re: factorial of decimal number...
« Last post by JohnK on April 23, 2024, 09:32:40 AM »
NOTE: I haven't read up on the concept, but I noticed a difference from yours and the windows calculator.
Example: if I type 6.2! in the basic windows calculator I get: 1,050.31
48
BricsCAD Users / Help with Macro: Set Current Layer + Start LISP
« Last post by CEHill on April 23, 2024, 09:05:25 AM »

GOAL:
Create a button macro that combines two actions.

Actions include:

1.) Set a layer (named Fastener) as current and

2.) Invokes an AutoLISP program that allows the user to select and insert a fastener. 

I have a basic understanding of button macro code. I am unsure of how to combine the two steps into one macro.

Thanks,
Clint
49
AutoLISP (Vanilla / Visual) / factorial of decimal number...
« Last post by ribarm on April 23, 2024, 08:42:24 AM »
I've read on Wikipedia about gamma function and factorial, double factorial and so on... but I am not convinced that those things written are 100% correct, so I decided to post this my sub function based on usual factorial of whole number...
Further more I am not convinced that factorial of 0 is defined as 1 - simply I'd give it nil value...
Now to present my sub :

Code: [Select]
(defun _dec_factorial ( n / _factorial )

  (defun _factorial ( n / k f r )
    (if (> n 0)
      (progn
        (setq k 0 r 1)
        (while (and (not f) (setq k (1+ k)))
          (if (= k n)
            (setq f t)
          )
          (setq r (* r k))
        )
      )
    )
    r
  )

  (if (equal n (fix n))
    (_factorial (fix n))
    (if (< 0 n 1)
      n
      (* n (_factorial (fix n)))
    )
  )
)

Any thougths...
Am I wrong or right?

Regards, M.R.
50
2024.04.23 Provide API compressed package version, no exe installation required

https://github.com/xdcad/XDrx-API-zip

https://sourceforge.net/projects/xdrx-api-zip/

Dual version link:

https://github.com/xdcad


=====================

# XDrx-API-zip
Autolisp development library written in ObjectARX (ZIP Version)


1.Installation help:


===================================================

1. Unzip the file to the specified directory

2. Enter the sys directory

3. Depending on your AutoCAD version, the 32-bit version of AutoCAD corresponds to x86, and the 64-bit version of AutoCAD corresponds to x64. Find the corresponding ARX file
   
   For example: the corresponding arx file for AutoCAD 2025 is: xdrx.2025.x64.arx
     
5. Use the mouse to drag the file to the ACAD window. If prompted, select Load

6. Finished. This process only needs to be performed once, and XDrx API will be automatically loaded when AUTOCAD is started later


====================================================


2.Introduction to XDrx API


Autolisp development library written in ObjectARX

The API of this project is only for personal study and research. XDrx API is Free, But, Please do not use it for commercial purposes. I will not be responsible for any previous consequences caused by this.

===========================

Encapsulation of ARX libraries (including AcDb, AcGe, AcBr...), encapsulation of EXCEL, SQL Database... C++ class library with thousands of functions for A/VLISP to call.

Supported versions: AutoCAD 2004-2025

===========================

AutoCAD AutoLisp Secondary Development Function Library (Including Xiaodong LISP General Function Library)

XDRX_API For AutoCAD 2004-2025

===========================

Version: 2024.04.28 Updated on April 23, 2024

===========================

XD LISP general function library Version number: 2024.04.28

===========================

Technical support: XDCAD Home-http://www.xdcad.net

Forum: http://bbs.xdcad.net

XDSoft QQ:7598165 Email:7598165@qq.com

eachy QQ:124471899 Email:124471899@qq.com

====================================================

3.Other accompanying API introductions

      OpenDCL -- The most popular visual dialog design API under AutoCAD,
                 author's website: https://opendcl.com/forum/
        
      ArxDBG  -- The powerful system environment monitoring tool provided by Autodesk ObjectARX SDK can improve the efficiency of your LISP development and debugging.
 
      Inspector -- A powerful symbol table monitoring tool under AutoCAD that can improve the efficiency of your LISP development and debugging
 
  Please use it within the license framework provided by the above API.
 
====================================================
Pages: 1 ... 3 4 [5] 6 7 ... 10