Author Topic: Display DCL preview without Vlisp.  (Read 8029 times)

0 Members and 1 Guest are viewing this topic.

curmudgeon

  • Newt
  • Posts: 194
Display DCL preview without Vlisp.
« 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.

Code: [Select]
((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.
Never express yourself more clearly than you are able to think.

Lee Mac

  • Seagull
  • Posts: 12910
  • London, England
Re: Display DCL preview without Vlisp.
« Reply #1 on: June 15, 2011, 05:36:40 PM »
Maybe I'm missing the point, but you could just use the same construct and feed it the arguments relevant to your DCL file:

Code: [Select]
(defun DCLPreview ( file dlg / id )
  (cond
    ( (< 0 (setq id (load_dialog file)))
      (if (new_dialog dlg id "(done_dialog)") (start_dialog))
      (unload_dialog id)
    )
  )
)

curmudgeon

  • Newt
  • Posts: 194
Re: Display DCL preview without Vlisp.
« Reply #2 on: June 15, 2011, 09:17:04 PM »
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.
Never express yourself more clearly than you are able to think.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Display DCL preview without Vlisp.
« Reply #3 on: June 15, 2011, 09:57:43 PM »
Why would you not use the built in editor in ACAD, VLIDE?
I've reached the age where the happy hour is a nap. ()
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

TimSpangler

  • Water Moccasin
  • Posts: 2010
  • CAD Naked!!
Re: Display DCL preview without Vlisp.
« Reply #4 on: June 16, 2011, 09:01:16 AM »
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++)
ACA 2015 - Windows 7 Pro
All Comments and Content by TimSpangler, Copyright 2016

curmudgeon

  • Newt
  • Posts: 194
Re: Display DCL preview without Vlisp.
« Reply #5 on: June 16, 2011, 09:04:58 AM »
Quote
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 )
Never express yourself more clearly than you are able to think.

curmudgeon

  • Newt
  • Posts: 194
Re: Display DCL preview without Vlisp.
« Reply #6 on: June 16, 2011, 09:11:51 AM »
Quote
(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.
Never express yourself more clearly than you are able to think.

Lee Mac

  • Seagull
  • Posts: 12910
  • London, England
Re: Display DCL preview without Vlisp.
« Reply #7 on: June 16, 2011, 09:19:43 AM »
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

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Display DCL preview without Vlisp.
« Reply #8 on: June 16, 2011, 09:28:30 AM »
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 >

« Last Edit: June 16, 2011, 10:29:21 AM by CAB »
I've reached the age where the happy hour is a nap. ()
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

curmudgeon

  • Newt
  • Posts: 194
Re: Display DCL preview without Vlisp.
« Reply #9 on: June 16, 2011, 11:18:38 AM »
Quote
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.
Never express yourself more clearly than you are able to think.

jbuzbee

  • Swamp Rat
  • Posts: 851
Re: Display DCL preview without Vlisp.
« Reply #10 on: June 16, 2011, 02:19:55 PM »
James Buzbee
Windows 8

alanjt

  • Needs a day job
  • Posts: 5352
  • Standby for witty remark...
Re: Display DCL preview without Vlisp.
« Reply #11 on: June 16, 2011, 02:22:12 PM »
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.
Civil 3D 2019 ~ Windohz 7 64bit
Dropbox

curmudgeon

  • Newt
  • Posts: 194
Re: Display DCL preview without Vlisp.
« Reply #12 on: June 16, 2011, 02:37:56 PM »
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.
Never express yourself more clearly than you are able to think.

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: Display DCL preview without Vlisp.
« Reply #13 on: June 16, 2011, 02:41:48 PM »
sorry that's not butter
Engineering Technologist CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.com http://cadanalyst.slack.com http://linkedin.com/in/cadanalyst

alanjt

  • Needs a day job
  • Posts: 5352
  • Standby for witty remark...
Re: Display DCL preview without Vlisp.
« Reply #14 on: June 16, 2011, 02:42:30 PM »
James, do you have some kind of notification every time DCL is typed in at theSwamp? LoL
Civil 3D 2019 ~ Windohz 7 64bit
Dropbox

jbuzbee

  • Swamp Rat
  • Posts: 851
Re: Display DCL preview without Vlisp.
« Reply #15 on: June 16, 2011, 04:04:49 PM »
Quote
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 Buzbee
Windows 8

alanjt

  • Needs a day job
  • Posts: 5352
  • Standby for witty remark...
Re: Display DCL preview without Vlisp.
« Reply #16 on: June 16, 2011, 04:06:12 PM »
Quote
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
Civil 3D 2019 ~ Windohz 7 64bit
Dropbox

JohnK

  • Administrator
  • Seagull
  • Posts: 10623
Re: Display DCL preview without Vlisp.
« Reply #17 on: June 16, 2011, 07:41:01 PM »
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").
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Display DCL preview without Vlisp.
« Reply #18 on: June 17, 2011, 08:26:32 PM »
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  ??

kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

JohnK

  • Administrator
  • Seagull
  • Posts: 10623
Re: Display DCL preview without Vlisp.
« Reply #19 on: June 17, 2011, 11:20:49 PM »
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).
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Display DCL preview without Vlisp.
« Reply #20 on: June 17, 2011, 11:31:47 PM »
Not much I can say to that John.

 :-P
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: Display DCL preview without Vlisp.
« Reply #21 on: June 17, 2011, 11:39:39 PM »
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.
Engineering Technologist CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.com http://cadanalyst.slack.com http://linkedin.com/in/cadanalyst

JohnK

  • Administrator
  • Seagull
  • Posts: 10623
Re: Display DCL preview without Vlisp.
« Reply #22 on: June 17, 2011, 11:46:51 PM »
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.
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

JohnK

  • Administrator
  • Seagull
  • Posts: 10623
Re: Display DCL preview without Vlisp.
« Reply #23 on: June 17, 2011, 11:49:21 PM »
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.

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.
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: Display DCL preview without Vlisp.
« Reply #24 on: June 17, 2011, 11:51:57 PM »
Try harder. :lol:
Engineering Technologist CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.com http://cadanalyst.slack.com http://linkedin.com/in/cadanalyst

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Display DCL preview without Vlisp.
« Reply #25 on: June 18, 2011, 08:07:10 AM »
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
I've reached the age where the happy hour is a nap. ()
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

jbuzbee

  • Swamp Rat
  • Posts: 851
Re: Display DCL preview without Vlisp.
« Reply #26 on: June 20, 2011, 12:45:40 PM »
James Buzbee
Windows 8

HofCAD

  • Guest
Re: Display DCL preview without Vlisp.
« Reply #27 on: August 15, 2011, 08:16:56 AM »

For a DCL preview without using VLIDE.
ViewDcl in http://www.autolisp.com/forum/showthread.php?t=284 from Terry Miller

HofCAD CSI
« Last Edit: August 15, 2011, 08:21:09 AM by HofCAD »

Andrea

  • Water Moccasin
  • Posts: 2372
Re: Display DCL preview without Vlisp.
« Reply #28 on: August 16, 2011, 05:37:03 PM »
so why not just use.. www.objectdcl.com and it own preview dialog who work without AutoCAD ?
Keep smile...