New tool to IntelliCAD : Create Construct Entities

#1
I saw on Acad a function very usefull "Construction" or "Create Construct line"
On IntelliCAD we can place the objects (line, shape etc...) on the CLINE layer.
I try to create a macro but nothing.
I must use a lisp script to place an object to the CLINE layer (create the CLINE layer if not exist or place to this layer).
Someone has an idea.... please?

Or make an Icad command directly???
Last edited by SPirou4D on Wed Jul 02, 2025 1:59 am, edited 1 time in total.

Re: How add a new function to IntelliCAD

#2

Code: Select all

(defun c:CLC ( / ent LayerName)
	(princ "\nChoose the entities to serve as construction... ")
	(setq ent (ssget))
	(setq LayerName "CLINE")
	(if (not (tblsearch "layer" LayerName ));test of existence
	  (command "_layer" "_M" LayerName "_C" 4) ;if it does not exist it is created
	)
	;it exists, just in case, we unfreeze it, activate it and unlock it, then we make it current
	(command "_layer" "_T" LayerName "_U" LayerName "_ON" LayerName "_S" LayerName "")
	XXX
	(princ)
)
(princ "\n==> CLC")
(princ)
I win to code this and now I want place the entities (ent) on this layer but with what command where XXX is, please?
Like :
foreach(place the ent on this layer)

Re: How add a new function to IntelliCAD

#3

Code: Select all

; CLC.lsp

; TRANSFORMER DES ENTITES EN LIGNE DE CONSTRUCTION

(defun c:CLC ( / ent sNomCalque)
	(princ "\nChoisissez les entites à mettre en construction... ")
	(setq ent (ssget))
	(setq sNomCalque "CLINE")
	(if (not (tblsearch "layer" sNomCalque));test de l'existence 
	  (command "_LAYER" "_M" sNomCalque "_color" 4) ;si n'existe pas il est créé et devient courant
	)
	(progn 
	(command "CHPROP" ent "" "_layer" "CLINE" "")
	)
	(princ)
)
(princ "\n==> CLC")
(princ)
I found this but don't work yet....An idea? I create and place the entities selection on the CLINE layer but the color of the CLINE layer is not Cyan....just ByLayer.
The command _M don't assign the color in same time of his Make...???

Re: How add a new function to IntelliCAD

#7
Indeed I hadn't see that... Sorry. All is ok now!

Today I added a feature: the type of CLINE will be "DASHED2" as in ACAD.
I added because Quan's answers two buttons to DisplayAll/Hide these objects.
If someone want this tool: https://1drv.ms/f/c/3e78343d1605325e/El ... A?e=IDp8XU

The Blue button is to create ConstructLines and eyes to DisplayAll/Hide the object in Block editor or default view.
I can explain how to add an Addons toolbar like this if needed :
2025-07-03 12 20 18.png
2025-07-03 12 20 18.png (6.3 KiB) Viewed 9462 times