SkillAgentSearch skills...

Cathedral

Cathedral is a collection of functions to be used in developing AutoLISP routines for AutoCAD. These functions provide new functionality for data processing in AutoLISP. #autolisp autolisp

Install / Use

/learn @Jciel/Cathedral
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

Cathedral

<img src="https://svgshare.com/i/F6A.svg" width="250" alt="Cathedral"> <br>

AutoLISP is a dialect of the programming language Lisp built specifically for use with the full version of AutoCAD and its derivatives, which include AutoCAD Map 3D, AutoCAD Architecture and AutoCAD Mechanical.

AutoLISP is a small, dynamically scoped, dynamically typed Lisp language dialect with garbage collection, immutable list structure, and settable symbols, lacking in such regular Lisp features as macro system, records definition facilities, arrays, functions with variable number of arguments or let bindings. Aside from the core language, most of the primitive functions are for geometry, accessing AutoCAD's internal DWG database, or manipulation of graphical entities in AutoCAD. (Wikipedia)

<br>

Cathedral is a collection of functions to be used in developing AutoLISP routines for AutoCAD. These functions provide
new functionality for data processing in AutoLISP like filter, chunk, string split, intersect, etc.

<br>

Contribute

Start the project and share! ;P
Fork the project and create a Pull Request :)
or send a sugestion in Issues :)

<br>

Installation

Download or clone the project.
Add de root directory cathedral in Suport File Search Path of AutoCAD options configutarion.
After you can load de file cathedral-load

(load path-to-cathedral-load-file)

Or add the file to load at AutoCAD initialization in appload configuration.
And functions will be available from the autocad command line and its AutoLISP codes.

<br> <br> <br> <br>

Documentations


Summary


<br> <br>

core

core/|>>

Creates a function pipe by passing the result of a function as a last parameter to the next function.
If the functions receives multiple parameters, thar should be passed as a list.

Parameters

list : callbackList : List of callback functions will be executed in the order they appear in the list. any : value : Value to be processed.

Return

any : Result after the application of the functions on the value.

Exemple

The code below receives a string and first passes to the stlen function that returns the string size, then passes that
result to the zerop function that checks whether it is a zero or not, thus checking whether the string is empty or not.

(|>> (list 
       strlen
       zerop) "testing") ; nill
	   
(|>> (list
       strlen
       zerop) "") ; T

The same of:

(zerop (strlen ""))

If the functions receives multiples params.
The example takes the list size, adds 5 and multiplies 2 by the result .

(setq lstElements '("a" "b" "c" "d"))

(|>> (list
	   length
	   '(+ 5)
	   '(* 2)) lstElements) ; 18

The same of:

(setq lstElements '("a" "b" "c" "d"))

(* 2 (+ 5 (length lstElements)))
Summary
<br> <br>
core/|>

Creates a function pipe by passing the result of a function as a first parameter to the next function.
If the functions receives multiple parameters, thar should be passed as a list.

Parameters

list : callbackList : List of callback functions will be executed in the order they appear in the list. any : value : Value to be processed.

Return

any : Result after the application of the functions on the value.

Exemple

The code below receives a string and first passes to the stlen function that returns the string size, then passes that
result to the zerop function that checks whether it is a zero or not, thus checking whether the string is empty or not.

(|> (list 
      strlen
      zerop) "testing") ; nill
	   
(|> (list
      strlen
      zerop) "") ; T

The same of:

(zerop (strlen ""))

If the functions receives multiples params.
The example takes the list size, adds 5 and 4, and multiplies the result by 2.

(setq lstElements '("a" "b" "c" "d"))

(|> (list
	  length
	  '(+ 5 4)
	  '(* 2)) lstElements) ; 26

The same of:

(setq lstElements '("a" "b" "c" "d"))

(* (+ (length lstElements) 5 4) 2)
Summary
<br> <br>
core/not=

Return True (T) if first parameter is not equal to second parameter

Parameters

any : elo : First parameter to compare
any : elt : Second parameter to compare

Return

bool : True (T) if first parameter is not equal to second parameter

Exemple

Check if first parameter is not equal to second parameter

(not= 1 2) ; T
(not= 1 1) ; nill
Summary
<br> <br>
core/notnull

Return True (T) if the parameter is not null

Parameters

any : elo : Parameter to verify

Return

bool : True (T) if the parameter is not null

Exemple

Check if the parameter is not null

(notnull 1) ; T
(notnull nil) ; nil
Summary
<br> <br>
core/neg?

Returns True (T) if the parameter is negative

Parameters

int : elo : Parameter to verify

Return

bool : True (T) if the parameter is negative

Exemple

Check if the parameter is negative

(neg? 1) ; nill
(neg? 0) ; nil
(neg? -2) ; T
Summary
<br> <br>
core/even?

Returns True (T) if the parameter is even

Parameters

int : elo : Parameter to verify

Return

bool : True (T) if the parameter is even

Exemple

Check if the parameter is even

(even? 1) ; nill
(even? 2) ; T
Summary
<br> <br>
core/odd?

Returns True (T) if the parameter is odd

Parameters

int : elo : Parameter to verify

Return

bool : True (T) if the parameter is odd

Exemple

Check if the parameter is odd

(odd? 1) ; T
(odd? 2) ; nil
Summary
<br> <br>
core/when

Execute body if test is True (T).

Parameters

exp : test : Logical test.
exp : body : Expression to execute.

Return

any : Return the result of execution body.

Exemple

Sum if num is equal 1.

(setq num 1)
(when (= num 1)
  (+ num 5)) ; 6
  
(setq num 2)
(when (= num 1)
  (+ num 5)) ; nil
Summary
<br> <br>
core/when-not

Execute body if test is False (nil).

Parameters

exp : test : Logical test.
exp : body : Expression to execute.

Return

any : Return the result of execution body.

Exemple

Sum if num is different 1.

(setq num 1)
(when-not (= num 1)
  (+ num 5)) ; nil
  
(setq num 2)
(when-not (= num 1)
  (+ num 5)) ; 7
Summary
<br> <br>

Related Skills

View on GitHub
GitHub Stars18
CategoryDevelopment
Updated3mo ago
Forks4

Languages

Common Lisp

Security Score

92/100

Audited on Dec 9, 2025

No findings