- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello everyone,
I am trying to learn lisp and my first task is to silent run Laydel to remove a layer and it's contents. I have this but the red "" for Enter does not seem to work. Is this the correct way to respond automatically with Enter?
(defun c:DeletePVCaseLayer ()
(command "-LAYDEL" "N" "PVcase PV Modules (detailed)" "" "Y")
(princ "\nLayer 'PVcase PV Modules (detailed)' has been deleted.")
(princ)
)
This is forcing user input at the command line.
Command: (load"LD")
C:DELETEPVCASELAYER
Command: LD
-LAYDEL
Select object on layer to delete or [Name]: N
Enter layer name or [?]: PVcase PV Modules (detailed)
Selected layers: PVcase PV Modules (detailed).
Select object on layer to delete or [Name/Undo]: Y
*Invalid selection*
Expects a point or Last/Name
; error: Function cancelled
Select object on layer to delete or [Name/Undo]:
******** WARNING ********
There are 4 block definition(s) which reference the layer(s) you are deleting.
The block(s) will be redefined and the entities referencing the layer(s)
will be removed from the block definition(s).
You are about to delete layer "PVcase PV Modules (detailed)" from this drawing.
Do you wish to continue? [Yes/No] <No>: Regenerating model.
Operation aborted.
Thanks for any insight and assistance,
John
John Mayo
Solved! Go to Solution.