Author Topic: Invoke VLIDE via Lisp?  (Read 2638 times)

0 Members and 1 Guest are viewing this topic.

Peter2

  • Swamp Rat
  • Posts: 650
Invoke VLIDE via Lisp?
« on: February 07, 2017, 11:25:25 AM »
I try to start VLIDE via Lisp (because I want to use vlisp-compile, but failed:

Code - Auto/Visual Lisp: [Select]
  1. Befehl: (vl-cmdf "vlide")
  2. Unbekannter Befehl "VLIDE". Drücken Sie F1-Taste für Hilfe.
  3. T
  4. --> unknown command
  5.  
  6. Befehl: (command "vlide")
  7. Unbekannter Befehl "VLIDE". Drücken Sie F1-Taste für Hilfe.
  8. nil
  9. --> unknown command
  10.  
  11. Befehl: (dcl-SendString "vlide ")
  12. T
  13.  
  14. --> Command from OpenDCL. It opens VLIDE, but the synchronization between opening VLIDE and continuing Lisp-code creates an error?
  15.  
Can it be solved?

BTW: When I start VLIDE manually, then the lisp with vlisp-compile works fine....

Thanks and regards
« Last Edit: February 07, 2017, 12:58:02 PM by Peter2 »
Peter

AutoCAD Map 3D 2023 German (so some technical terms will be badly retranslated to English)
BricsCAD V23

rkmcswain

  • Swamp Rat
  • Posts: 978
Re: Invoke VLIDE via Lisp?
« Reply #1 on: February 07, 2017, 11:33:32 AM »
This works for me.


Code: [Select]


(defun C:foo () (c:vlide)(princ))



Peter2

  • Swamp Rat
  • Posts: 650
Re: Invoke VLIDE via Lisp?
« Reply #2 on: February 07, 2017, 01:01:49 PM »
Thanks - works fine.

(Additional info for readers:
- The command brings VLIDE to foreground. An additional click (e.g. minmize) continues the lisp.
- For usage of vlisp-compile it is not necessary that VLIDE is always open, but it has to be invoked at least one time ..)
Peter

AutoCAD Map 3D 2023 German (so some technical terms will be badly retranslated to English)
BricsCAD V23

snownut2

  • Swamp Rat
  • Posts: 971
  • Bricscad 22 Ultimate
Re: Invoke VLIDE via Lisp?
« Reply #3 on: February 07, 2017, 02:52:13 PM »
Or this  (c:vlide T) starts vlide minimized....
« Last Edit: February 07, 2017, 03:12:56 PM by snownut2 »

Peter2

  • Swamp Rat
  • Posts: 650
Re: Invoke VLIDE via Lisp?
« Reply #4 on: February 08, 2017, 03:11:34 AM »
Or this  (c:vlide T) starts vlide minimized....
Great - thanks.

(Where did you get the information from? I checked F1 in VLIDE - and got the AutoCAD-Help starting page; checked the V-functions-reference ... - no info about "c:vlide T" ... )
Peter

AutoCAD Map 3D 2023 German (so some technical terms will be badly retranslated to English)
BricsCAD V23

BIGAL

  • Swamp Rat
  • Posts: 1409
  • 40 + years of using Autocad
Re: Invoke VLIDE via Lisp?
« Reply #5 on: February 18, 2017, 10:20:48 PM »
You can do a lisp compile directly without invoking vl-ide. A quick google help from Autodesk

Code: [Select]
Examples
Assuming that yinyang.lsp resides in a directory that is in the AutoCAD support file search path, the following command compiles this program:

(vlisp-compile 'st "yinyang.lsp")
T
The output file is named yinyang.fas and resides in the same directory as the source file.

The following command compiles yinyang.lsp and names the output file GoodKarma.fas:

(vlisp-compile 'st "yinyang.lsp" "GoodKarma.fas")

A man who never made a mistake never made anything

Peter2

  • Swamp Rat
  • Posts: 650
Re: Invoke VLIDE via Lisp?
« Reply #6 on: February 20, 2017, 04:47:52 AM »
You can do a lisp compile directly without invoking vl-ide. ...
For me it works only as described above: VLIDE has to be invoked at least once (and can be closed again), then the command will do its job.

On a freshly started AutoCAD-session I get
Code: [Select]
Befehl: (vlisp-compile 'st "x.lsp")
; Fehler: no function definition: VLISP-COMPILE
when VLIDE was not started before.
Peter

AutoCAD Map 3D 2023 German (so some technical terms will be badly retranslated to English)
BricsCAD V23

marcoheuer

  • Mosquito
  • Posts: 3
Re: Invoke VLIDE via Lisp?
« Reply #7 on: February 20, 2017, 09:40:25 AM »
from acad dev help file:
Note: The Visual LISP IDE must be open in order for vlisp-compile to work.

best regards
marco

Peter2

  • Swamp Rat
  • Posts: 650
Re: Invoke VLIDE via Lisp?
« Reply #8 on: February 21, 2017, 03:09:25 AM »
Or this  (c:vlide T) starts vlide minimized....
Any idea how to close VLIDE via Lisp? The following code does nothing or opens it
Code - Auto/Visual Lisp: [Select]
  1. Befehl: (c:vlide T)
  2. Befehl: (c:vlide nil)
  3. Befehl: (c:vlide close)
And here are no solutions either:
https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/close-vlide/td-p/2502632

Seem to be impossible...
« Last Edit: February 21, 2017, 03:32:18 AM by Peter2 »
Peter

AutoCAD Map 3D 2023 German (so some technical terms will be badly retranslated to English)
BricsCAD V23

snownut2

  • Swamp Rat
  • Posts: 971
  • Bricscad 22 Ultimate
Re: Invoke VLIDE via Lisp?
« Reply #9 on: February 21, 2017, 08:17:52 AM »
Or this  (c:vlide T) starts vlide minimized....
Any idea how to close VLIDE via Lisp? The following code does nothing or opens it
Code - Auto/Visual Lisp: [Select]
  1. Befehl: (c:vlide T)
  2. Befehl: (c:vlide nil)
  3. Befehl: (c:vlide close)
And here are no solutions either:
https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/close-vlide/td-p/2502632

Seem to be impossible...

Not that I'm aware of.