OpenDCL Forums

OpenDCL => Show and Tell => Topic started by: BazzaCAD on October 12, 2007, 05:28:27 PM

Title: My new Mtext Editor
Post by: BazzaCAD on October 12, 2007, 05:28:27 PM
I got tired of trying to remember all these strange UNICODE addresses to place our custom symbols into mtext so I created this little dialog to help me out...
Check out the video here...
http://www.screencast.com/t/Lzphx8Mg3ws (http://www.screencast.com/t/Lzphx8Mg3ws)
Title: Re: My new Mtext Editor
Post by: jb on October 15, 2007, 03:50:58 AM
Barry, very nice.  Is there any way to delete the right click paste operation?  Not really a big deal though.

Nice one!


jb
Title: Re: My new Mtext Editor
Post by: Kerry on October 16, 2007, 03:21:09 AM
Neat Barry !
Title: Re: My new Mtext Editor
Post by: Matt W on October 16, 2007, 11:50:46 AM
Pretty cool.... Don't suppose you'd like to share?
Title: Re: My new Mtext Editor
Post by: BazzaCAD on October 17, 2007, 10:23:54 AM
Quote from: jb on October 15, 2007, 03:50:58 AM
Barry, very nice.  Is there any way to delete the right click paste operation?  Not really a big deal though.

Nice one!


jb

I really wish I could find away to not have to click inside the editor & paste. (I actually use CTRL+V but used the right so you could see the operation on-screen). The prob. is the Mtext editor takes full focus and there doesn't seam to be any way to interact with it. I was hoping there might be a .NET why of doing it, but I don't know much about .NET so this was the best workaround I could think up. If anyone knows how to do a paste programmatically into the mtext editor any help would be much appreciated.
Title: Re: My new Mtext Editor
Post by: BazzaCAD on October 17, 2007, 10:55:30 AM
Quote from: Matt W on October 16, 2007, 11:50:46 AM
Pretty cool.... Don't suppose you'd like to share?

OK here's my code.
Note, these UNICODE addresses are hard coded to my font "Archs.shx" so you'd have to modify it to work with your font.
Also, it's currently not setup to handle multiple fonts.
You'll also need DosLib to run the code.

Here's an example on how to set it up for creating a new Mtext object:
(defun c:mt (/)
  (setq inspt (getpoint "\nInsertion Point: "))
  (initdia)
  (load "MTClipboadSymbols")
  (dcl_Project_Load "clip.odcl")   
  (dcl_Form_Show clip_Form1)
  (dcl_SetCmdBarFocus)
  (command ".mtext" inspt pause)
  (dcl_Form_Close clip_Form1)
)

You'd have to do the same for Dtext & Mleaders...

For Dbl. Clk. editing of objects, you'll have to edit your CUI per the screen shot below...


[attachment deleted by admin]
Title: Re: My new Mtext Editor
Post by: jb on October 18, 2007, 04:59:48 AM
Just for the record, Autodesk blatantly stole my Double Click options idea and didn't even bother to acknowledge the fact that I've provided the option of customizing double click actions since v2002!

(http://www.studio2405.com/jdb/dbb.jpg)

Oh well . . .  ::)

Barry, what do you use doslib for in this routine??
Title: Re: My new Mtext Editor
Post by: Matt W on October 18, 2007, 06:15:02 AM
Quote from: BazzaCAD on October 17, 2007, 10:55:30 AM
Quote from: Matt W on October 16, 2007, 11:50:46 AM
Pretty cool.... Don't suppose you'd like to share?

OK here's my code.

Cool.... Thanks!


Quote from: jb on October 18, 2007, 04:59:48 AM
Barry, what do you use doslib for in this routine??

Looks like copying/pasting to/from the Clipboard.
Title: Re: My new Mtext Editor
Post by: BazzaCAD on October 19, 2007, 10:31:38 AM
Quote from: Matt W on October 18, 2007, 06:15:02 AM
Quote from: jb on October 18, 2007, 04:59:48 AM
Barry, what do you use doslib for in this routine??
Looks like copying/pasting to/from the Clipboard.

Actually just to the clipboad. From just used the OS CTRL+V
I think I've seen an all lisp version of putting to the clipboard, but didn't want to deal with it, since I already had DosLib.