Visual Studio Code AutoCAD AutoLISP extension is missing a snippet for the (cond) function

Visual Studio Code AutoCAD AutoLISP extension is missing a snippet for the (cond) function

hawstom
Advocate Advocate
374 Views
2 Replies
Message 1 of 3

Visual Studio Code AutoCAD AutoLISP extension is missing a snippet for the (cond) function

hawstom
Advocate
Advocate

I am just starting to use Visual Studio Code today with the AutoCAD AutoLISP extension. I am trying out the code snippets, but there is not one for (cond).

 

Explanation:

If I type 

 

while

 

the extension expands it to 

 

 

(while testexpr [expr ...])

 

 
If I type

 

if

 

the extension expands it to 
 

 

(if (testexpr)
  (progn
    (thenexpr)
  )
)

 

 
But if I type 

 

cond

 

there is no helpful expansion.

 

cond

 

 
I found out that I can add snippets under File, Preferences, Configure User Snippets. But I thought I better report the issue. Can anybody confirm this?
 
Tom
0 Likes
375 Views
2 Replies
Replies (2)
Message 2 of 3

pbejse
Mentor
Mentor

@hawstom wrote:

I am just starting to use Visual Studio Code today with the AutoCAD AutoLISP extension. I am trying out the code snippets, but there is not one for (cond).

 

cond
there is no helpful expansion.

Same here in AutoCAD 2022 / VS code 1.73

 

 

 

 

Message 3 of 3

hawstom
Advocate
Advocate

Correct. I guess that is what I am reporting. In all my 31 years using AutoCAD, I still don't know the right place to submit bug reports.

 

This is my custom (cond) snippet.

"Cond": {
	"prefix": "cond",
	"body": [
		"(cond",
		"  (${1:testexpr1}",
		"   ${2:[thenexpr1 ...]}",
		"  )",
		"  (${3:testexpr2}",
		"   ${4:[thenexpr2 ...]}",
		"  )",
		")"
		],
	"description": "Conditional function"
}

 

 

 

And this is what it creates:

(cond
  (testexpr1
   [thenexpr1 ...]
  )
  (testexpr2
   [thenexpr2 ...]
  )
)