TheSwamp
Code Red => AutoLISP (Vanilla / Visual) => Topic started by: curmudgeon on June 15, 2011, 05:09:23 PM
-
wanting to write a dialog box - using alternate editor, but missing the preview I had in Vlisp.
no more.
((lambda(/ id)(setq id(LOAD_DIALOG "C:/Program Files/ACAD2000/$vld$.dcl"))(cond((>= id 0)(if(NEW_DIALOG "rak" id "(done_dialog)")(START_DIALOG))(UNLOAD_DIALOG id)))))
OK, I cheated. Invoked the command and copied from the Autocad Text Window (F2). I can see that there will need to be some tweaking when I want to run this in lisp, since the file won't always be "rak", and [I think] the id increments, so it won't always be 0. I could be wrong about that second part. but I am learning.
notwithstanding, I am going to feel clever for the next 17 seconds, or until I hit the post button. whichever comes first.
-
Maybe I'm missing the point, but you could just use the same construct and feed it the arguments relevant to your DCL file:
(defun DCLPreview ( file dlg / id )
(cond
( (< 0 (setq id (load_dialog file)))
(if (new_dialog dlg id "(done_dialog)") (start_dialog))
(unload_dialog id)
)
)
)
-
It's more like I was not very clear in the first post.
I had not yet attempted to write what you did. Dialog boxes are what I am trying to get my head around just now.
Thank you for the code - I will put the time you saved me too use writing and rewriting until I get some stuff I can use.
-
Why would you not use the built in editor in ACAD, VLIDE?
-
LispLink has dialog preview. I used it for a few years. It worked really good (not free though) I now use something like what Lee posted. (and I've switched to Notepad++)
-
Why would you not use the built in editor in ACAD, VLIDE?
good morning - sorry, that was a part of a diiferent thread. after I kind of mangled the original thoughts, I began again here.
I have left Windows and I am running Ubuntu, Maverick Meerkat. I love the OS, but there are things I have to do to make dear old Autocad run. I don't know you will share this experience, but the interface between Vlisp and Autocad - well, I am going to call it glitchy. BUT I SURE USED IT. I love the preview for DCL, but in the new setup, the preview forces me back to Autocad, and it fails to ever quite get there. Kind of like a lock up, but somehow I have almost always been able to get Vlisp shut down and start over.
I AM JUST ALMOST THERE WITH MY FIRST USEFUL DIALOG BOX, and I am trying to find better efficiency writing it. Testing the DCL from the command line is one possible workaround.
The routine draws window in elevation, and although I have set defaults to minimze editing, there are still lots of data to input every time. A dialog box will of course let me ignore the options that do not need correction.
How is the weather in sunny FL?
( or do I have my wires crossed about longitude and latitude )
-
(and I've switched to Notepad++)
I think Notepad++ will be my baseline to compare to. But I expect to edit there, and test in Autocad, hence the terse lisp routine.
(thanks again Lee)
NOW I HAVE TO TRAIN THE DRAUGHTSMAN.
and I wonder if I have enough beer if he happens to get it right.
no, when he happens to get it right.
Se7en says "Vim", and that will be one thing I work with to make that comparision.
-
You're welcome :-)
I suppose you could take the code a little further to emulate the VLIDE DCL Preview and have a program to read the DCL file and extract the names of any Dialog Definitions contained therein, then prompt the user to select a definition to preview from a list_box.
The only 'annoying' part would be that you would have to save the DCL file before previewing it - unless you can figure out a way to read the DCL code directly from your editor and create a temporary file like the VLIDE does.
Lee
-
How is the weather in sunny FL?
( or do I have my wires crossed about longitude and latitude )
Hot Hot Hot :evil:
Feels like temp yesterday was 106
But we got an inch of rain last night & it cooled things off a bit.
Thanks for the explanation.
If you were ambitious you could write a lisp to read the DCL file & generate a lisp to call it for test purposes. 8-) <edit: I guess Lee just said that, as I go for my second cup. Dooough >
-
The only 'annoying' part would be that
MANIACLE LAUGHTER ENSUES.
I am breaking trail here. I know, to work under the new OS. Latest annoying part is that the MTEXT editor background is black, like the text renders in the edit box, black. System variables, options in the editor, no joy. Finally learned how to change the default editor, and remember that C: on this machine is not what Autocad thinks it is......
But it works. And I have some plans to crank out - getting paid something for beta testing.
"the weather is here, I wish you were beautiful" is running through my mind.
77 degrees, clear sky, RH 57%, Wind south / 6.0 knots.
that's what they call "Chamber of Commerce" weather for Missouri. it doesn't get any better than that.
-
http://www.opendcl.com
:wink:
-
http://www.opendcl.com
:wink:
:-D
How is the weather in sunny FL?
( or do I have my wires crossed about longitude and latitude )
Hot Hot Hot :evil:
Feels like temp yesterday was 106
But we got an inch of rain last night & it cooled things off a bit.
Thanks for the explanation.
If you were ambitious you could write a lisp to read the DCL file & generate a lisp to call it for test purposes. 8-) <edit: I guess Lee just said that, as I go for my second cup. Dooough >
It's hot as hell in North Florida and with this fire in Georgia, there's smoke everywhere.
-
opendcl downloaded and installed.
hello learning curve, or are you just glad to see me?
8-)
feeling a bit like a 13 year cicada just landed in my 7 course meal with all the goodies on my plate.
but I like it.
butter please.
-
sorry that's not butter
-
James, do you have some kind of notification every time DCL is typed in at theSwamp? LoL
-
James, do you have some kind of notification every time DCL is typed in at theSwamp? LoL
There's an app for that! :-D
-
James, do you have some kind of notification every time DCL is typed in at theSwamp? LoL
There's an app for that! :-D
:-D
-
Its roughly based upon the one that notifies me when someone types in the phrase "Text Editor" and doesnt also type ("Vim" || "Gvim") && ("Rocks" || "the best" || "great").
-
Its roughly based upon the one that notifies me when someone types in the phrase "Text Editor" and doesnt also type ("Vim" || "Gvim") && ("Rocks" || "the best" || "great").
Do they make hard drives with enough capacity ??
(http://www.theswamp.org/screens/index.php?dir=kerry/&file=pinkie.gif)
-
Oh you're just pissy cause ive been using features for years that UltraEdit has just only released its "best attempt to try and emulate".
BTW, i just checked out the UltraEdit website...I would say that the editor has reached the "cute" stage (as in: Awe, thats cute....look, it can blow bubbles).
-
Not much I can say to that John.
:-P
-
Lol at the trolling attempt to start a fan boi fight. Use the tools that make you productive. UE works great for all my needs sans a learning curve. (http://www.theswamp.org/screens/mp/wave.gif)
-
Holly UI Batman!? How do you find what you're looking for?
*heh* ...i just have to hit <F8> but, obviously most times i just find it too difficult to reach all the way up there.
-
Lol at the trolling attempt to start a fan boi fight. Use the tools that make you productive. UE works great for all my needs sans a learning curve. (http://www.theswamp.org/screens/mp/wave.gif)
Oh come on. You dont think that im actually being serious or that I really care that you guys use UE? ...Use any editor you want.
-
Try harder. :lol:
-
Kerry,
What a way to wake up. Swamp in the morning and a large mug of hot coffee.
Just glad I didn't have a mouth full when I saw your post. LOL
-
www.opendcl.com (http://www.opendcl.com)
-
For a DCL preview without using VLIDE.
ViewDcl in http://www.autolisp.com/forum/showthread.php?t=284 from Terry Miller
HofCAD CSI
-
so why not just use.. www.objectdcl.com (http://www.objectdcl.com) and it own preview dialog who work without AutoCAD ?