Message 1 of 5
SelectionChanged event and lisp code
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
okay... I am using SelectionChanged event in ThisDrawing.
within this event procedure I am running some lisp to deselect and turn off grips as follows:
[code]
ThisDrawing.SendCommand _
"(load " & Chr(34) & "VlaSStoLispSS" & Chr(34) & ")" & vbCr
'| | | | |--- carraige return
'| | | |--- closing lisp parens
'| | |--- embedded double quote
'| |---- lisp file to load (from IpcLisp folder - in AutoCAD Search Path)
'|-------------- embedded double quote mark
SendCommand "(VlaSS>LispSS) "
SendCommand "(sssetfirst) "
SendCommand "(sssetfirst nil LispSS) "
[/code]
The basic idea was taken from this post:
http://discussion.autodesk.com/thread.jspa?messageID=4056447
The trouble I am having is that the lisp code it tripping the event again so that it continues in a continual loop.
I tried putting the body of the code in a condition... but as soon as my app resets the boolean (in a completely different module) the event starts looping continuously again.
anyone have any ideas how I can stop the recursiveness but let it run the next time the user does a selection in the drawing?
within this event procedure I am running some lisp to deselect and turn off grips as follows:
[code]
ThisDrawing.SendCommand _
"(load " & Chr(34) & "VlaSStoLispSS" & Chr(34) & ")" & vbCr
'| | | | |--- carraige return
'| | | |--- closing lisp parens
'| | |--- embedded double quote
'| |---- lisp file to load (from IpcLisp folder - in AutoCAD Search Path)
'|-------------- embedded double quote mark
SendCommand "(VlaSS>LispSS) "
SendCommand "(sssetfirst) "
SendCommand "(sssetfirst nil LispSS) "
[/code]
The basic idea was taken from this post:
http://discussion.autodesk.com/thread.jspa?messageID=4056447
The trouble I am having is that the lisp code it tripping the event again so that it continues in a continual loop.
I tried putting the body of the code in a condition... but as soon as my app resets the boolean (in a completely different module) the event starts looping continuously again.
anyone have any ideas how I can stop the recursiveness but let it run the next time the user does a selection in the drawing?