BURST command in lisp

BURST command in lisp

davidEPN6Z
Participant Participant
1,027 Views
7 Replies
Message 1 of 8

BURST command in lisp

davidEPN6Z
Participant
Participant

I have this line in my script :

(command "_.BURST" (ssadd ent) "")

I'm getting an error "Unknown command"

Why???

0 Likes
Accepted solutions (1)
1,028 Views
7 Replies
Replies (7)
Message 2 of 8

tramber
Advisor
Advisor
Accepted solution
  (sssetfirst nil  (ssadd ent)) ;makes your selection both gripped and selected. 
  (c:burst)

To me, that's the way to send the command. 


EESignature

Message 3 of 8

ВeekeeCZ
Consultant
Consultant

Why? Because it's not a regular built-in command. It's just another LISP function being part of Express tools.

 

eekeeCZ_0-1757336599702.png

 

0 Likes
Message 4 of 8

tramber
Advisor
Advisor

(or c:burst(load "burst.lsp"))

Before ?


EESignature

Message 5 of 8

ryanatkins49056
Enthusiast
Enthusiast

BURST is an Express Tools command written in AutoLISP. To call it you would need to use

(c:burst)

If you are feeding items from a selection set into it as part of your script you will need to dig down into the AutoLISP file itself.

0 Likes
Message 6 of 8

Sea-Haven
Mentor
Mentor

Something like this.

 

(prompt "\nSelect object\n")
(setq ent (ssget "_+.:E:S"))
(command "BURST" ent "")

 

 

0 Likes
Message 7 of 8

Kent1Cooper
Consultant
Consultant

@Sea-Haven wrote:
....
(command "BURST" ent "")

That has the same problem as in Message 1, because BURST is not a native AutoCAD command, so it cannot be used in an AutoLisp (command) function.  The suggestion by @tramber in Message 2 is the approach to take.  The way to call an AutoLisp-defined command is the (C:YourCommandName) approach.  And since that cannot take User selection or inputs or variables internally, as native AutoCAD commands in a (command) function can, you need to have your selection already selected/highlighted when you call it, which is what the (sssetfirst) function does.  [And it can be a selection of more than one object when you need that.]

Kent Cooper, AIA
0 Likes
Message 8 of 8

davidEPN6Z
Participant
Participant

Thank you all. I used tramber approch and its working. Thanks tramber/

0 Likes