Author Topic: Mlisp vs Field ??  (Read 14558 times)

0 Members and 1 Guest are viewing this topic.

Andrea

  • Water Moccasin
  • Posts: 2372
Mlisp vs Field ??
« on: September 29, 2009, 03:40:06 PM »
Hi all..

I'm thinking about a new concept to use MTEXT with Lisp.

I know that Filed is cool...but I think that it is limited...
We can use many thing like AutoCAD and Lisp Variables...

but is it anought ?

There is the first scratch of :

Mlisp v.1.0.0

(conceptual design at the moment to know your feilling pulse)

the first Gif show a simple code..
but you can do anything !!  even put an
Code: [Select]
(alert "Hello!") or (startapp ...)..thanks.


Keep smile...

Lee Mac

  • Seagull
  • Posts: 12914
  • London, England
Re: Mlisp vs Field ??
« Reply #1 on: September 29, 2009, 03:46:48 PM »
Nice idea Andrea - Am I right in saying that you are just detecting the use of parentheses within the Mtext String? Or have you come up with something more ingenious? (probably the latter :wink:)

I suppose perhaps reactors would be used to update text that contains these LISP expressions - nice idea I must say.  :kewl:

Lee

Andrea

  • Water Moccasin
  • Posts: 2372
Re: Mlisp vs Field ??
« Reply #2 on: September 29, 2009, 03:54:55 PM »
thanks Lee.

Is that Idea was on of your program list ??  LOL !! :wink:

for the moment....I do not use any reactor.
but the power of it it is that you can run any lisp function ..

 ^-^

Keep smile...

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Mlisp vs Field ??
« Reply #3 on: September 29, 2009, 04:15:27 PM »
Could be cool, but I wouldn't want to use/support it in a production environment, especially when you share drawings with other firms.
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

Lee Mac

  • Seagull
  • Posts: 12914
  • London, England
Re: Mlisp vs Field ??
« Reply #4 on: September 29, 2009, 04:29:42 PM »
thanks Lee.

Is that Idea was on of your program list ??  LOL !! :wink:

for the moment....I do not use any reactor.
but the power of it it is that you can run any lisp function ..


I must admit, I hadn't thought of that - but maybe in the future, I might've...  :-P

I think you would need to implement reactors of some sort, to update the display.  :-)

Could be cool, but I wouldn't want to use/support it in a production environment, especially when you share drawings with other firms.

True, I agree - the firms would not know what to do with the text without having the function supplied, and I would think it may cause more trouble than its worth...  :oops:

Lee Mac

  • Seagull
  • Posts: 12914
  • London, England
Re: Mlisp vs Field ??
« Reply #5 on: September 29, 2009, 05:34:27 PM »
PS> Andrea, why do your screen animations always seem to have a "faded" look about them? I assume you are using Camtasia right?

Andrea

  • Water Moccasin
  • Posts: 2372
Re: Mlisp vs Field ??
« Reply #6 on: September 29, 2009, 05:36:19 PM »
I 've played with background color...

 :-)
Keep smile...

Lee Mac

  • Seagull
  • Posts: 12914
  • London, England
Re: Mlisp vs Field ??
« Reply #7 on: September 29, 2009, 05:47:01 PM »
I 've played with background color...

 :-)

Oh right, I just prefer the jet black background - makes it clearer imo  :wink:

Andrea

  • Water Moccasin
  • Posts: 2372
Re: Mlisp vs Field ??
« Reply #8 on: September 30, 2009, 08:04:31 AM »
Could be cool, but I wouldn't want to use/support it in a production environment, especially when you share drawings with other firms.

Thanks Tim...maybe you'r right, same thing with fields,
but I think that can be more useful than fields for many firms.
Keep smile...

CHulse

  • Swamp Rat
  • Posts: 504
Re: Mlisp vs Field ??
« Reply #9 on: September 30, 2009, 09:10:17 AM »
Excellent idea! I have been looking for a way to use lisp in fields - this seems like the solution.  8-)
Very cool indeed.
Cary Hulse
Urban Forestry Manager
Wetland Studies and Solutions

Civil 3D 2020 & 2023

SPDCad

  • Bull Frog
  • Posts: 453
Re: Mlisp vs Field ??
« Reply #10 on: September 30, 2009, 09:56:17 PM »
When fields came out back in release 2005 (i believe it was), it was my first wish list item for AutoCAD 2006. To have the power of lisp in the field command.
Sadly Audotdesk still haven't listened, but thanks to Andrea I may just have that power...(with an evil laugh)

I use DIESIL in the field command whenever i can, but only for small things. The power of lisp is just not there.
At one time i used to use DIESEL with the rtext command.  I believe it was in release 2002 and 2004.

Oh how i wish i had the time and knowledge to prosue great ideas like Andrea and Lee mac have.
I am totally jealeous of you guys and gals.
I am excited and can't wait to explore the code for this lisp.

Keep up the great work!!!




AutoCAD 2010, w/ OpenDCL

visit: http://reachme.at/spd_designs

Crank

  • Water Moccasin
  • Posts: 1503
Re: Mlisp vs Field ??
« Reply #11 on: October 01, 2009, 07:03:02 AM »
When fields came out back in release 2005 (i believe it was), it was my first wish list item for AutoCAD 2006. To have the power of lisp in the field command.
Sadly Audotdesk still haven't listened,[...]
This was not in Acad2006, but now you can add LispVariables, SystemVariables and Formulas in FIELDs.
Vault Professional 2023     +     AEC Collection

Andrea

  • Water Moccasin
  • Posts: 2372
Re: Mlisp vs Field ??
« Reply #12 on: October 01, 2009, 08:59:13 AM »
When fields came out back in release 2005 (i believe it was), it was my first wish list item for AutoCAD 2006. To have the power of lisp in the field command.
Sadly Audotdesk still haven't listened,[...]
This was not in Acad2006, but now you can add LispVariables, SystemVariables and Formulas in FIELDs.

Mlisp allow Lisp function not only lisp variables. :pissed:
Keep smile...

Crank

  • Water Moccasin
  • Posts: 1503
Re: Mlisp vs Field ??
« Reply #13 on: October 01, 2009, 12:11:28 PM »
Mlisp allow Lisp function not only lisp variables. :pissed:
OK, but all your examples are also possible with fields. The idea is interesting, but I'm not convinced. ;)
Vault Professional 2023     +     AEC Collection

alanjt

  • Needs a day job
  • Posts: 5352
  • Standby for witty remark...
Re: Mlisp vs Field ??
« Reply #14 on: October 01, 2009, 12:42:41 PM »
Code: [Select]
(length (layoutlist))
Civil 3D 2019 ~ Windohz 7 64bit
Dropbox

Lee Mac

  • Seagull
  • Posts: 12914
  • London, England
Re: Mlisp vs Field ??
« Reply #15 on: October 01, 2009, 12:52:40 PM »
Code: [Select]
(length (layoutlist))

haha good example  :wink:

Andrea

  • Water Moccasin
  • Posts: 2372
Re: Mlisp vs Field ??
« Reply #16 on: October 01, 2009, 01:10:02 PM »
another one ??   :evil:
Keep smile...

alanjt

  • Needs a day job
  • Posts: 5352
  • Standby for witty remark...
Re: Mlisp vs Field ??
« Reply #17 on: October 01, 2009, 01:14:46 PM »
Civil 3D 2019 ~ Windohz 7 64bit
Dropbox

Lee Mac

  • Seagull
  • Posts: 12914
  • London, England
Re: Mlisp vs Field ??
« Reply #18 on: October 01, 2009, 01:15:36 PM »
Nice idea Andrea  - good example.

alanjt

  • Needs a day job
  • Posts: 5352
  • Standby for witty remark...
Re: Mlisp vs Field ??
« Reply #19 on: October 01, 2009, 01:19:31 PM »
This has monstrous potential, I just wish it was core.
Civil 3D 2019 ~ Windohz 7 64bit
Dropbox

Crank

  • Water Moccasin
  • Posts: 1503
Re: Mlisp vs Field ??
« Reply #20 on: October 01, 2009, 01:21:22 PM »
Good examples!
As soon as everybody at our company knows a bit of lisp I´ll put it in the menu.   :-P
Vault Professional 2023     +     AEC Collection

Lee Mac

  • Seagull
  • Posts: 12914
  • London, England
Re: Mlisp vs Field ??
« Reply #21 on: October 01, 2009, 01:25:46 PM »
I wonder... could you incorporate this functionality into the Text of the "famous" DiLeader...   :-P  ;-)

Andrea

  • Water Moccasin
  • Posts: 2372
Re: Mlisp vs Field ??
« Reply #22 on: October 01, 2009, 01:31:57 PM »
all it is now possible...

even hide the code.
Keep smile...

Lee Mac

  • Seagull
  • Posts: 12914
  • London, England
Re: Mlisp vs Field ??
« Reply #23 on: October 01, 2009, 01:34:57 PM »
I'm loving the use of MTJIGSTRING in all this  :-P

Andrea, just curious, would the code work if I were to have a textstring something like this:

Code: [Select]
"Hello Andrea (Andreetti) would this work? (princ "\nNice Program")"

Andrea

  • Water Moccasin
  • Posts: 2372
Re: Mlisp vs Field ??
« Reply #24 on: October 01, 2009, 01:45:59 PM »
I'm loving the use of MTJIGSTRING in all this  :-P

Andrea, just curious, would the code work if I were to have a textstring something like this:

Code: [Select]
"Hello Andrea (Andreetti) would this work? (princ "\nNice Program")"

Until the program is not ready....I got no error but wrong result..
let me take some days and i'll be back with the first attempt code.   8-)
If you have some other string that I can test please let me know.
thanks.
Keep smile...

alanjt

  • Needs a day job
  • Posts: 5352
  • Standby for witty remark...
Re: Mlisp vs Field ??
« Reply #25 on: October 01, 2009, 01:49:44 PM »
I'm loving the use of MTJIGSTRING in all this  :-P

Andrea, just curious, would the code work if I were to have a textstring something like this:

Code: [Select]
"Hello Andrea (Andreetti) would this work? (princ "\nNice Program")"

Until the program is not ready....I got no error but wrong result..
let me take some days and i'll be back with the first attempt code.   8-)
If you have some other string that I can test please let me know.
thanks.

Yeah, it's going to need some kind of validation, similar to the Diesel one in Fields.
Civil 3D 2019 ~ Windohz 7 64bit
Dropbox

Lee Mac

  • Seagull
  • Posts: 12914
  • London, England
Re: Mlisp vs Field ??
« Reply #26 on: October 01, 2009, 04:02:03 PM »
I'm loving the use of MTJIGSTRING in all this  :-P

Andrea, just curious, would the code work if I were to have a textstring something like this:

Code: [Select]
"Hello Andrea (Andreetti) would this work? (princ "\nNice Program")"

Until the program is not ready....I got no error but wrong result..
let me take some days and i'll be back with the first attempt code.   8-)
If you have some other string that I can test please let me know.
thanks.

I just wondered about the method of LISP code validation, as Alanjt points out.  :wink:

CHulse

  • Swamp Rat
  • Posts: 504
Re: Mlisp vs Field ??
« Reply #27 on: October 02, 2009, 09:25:23 AM »
Code: [Select]
(length (layoutlist))

haha good example  :wink:
:) Thought you'd like that.


Ha Ha, where have I seen that one before?  :wink:


I can't wait to try this...  8-)
Cary Hulse
Urban Forestry Manager
Wetland Studies and Solutions

Civil 3D 2020 & 2023

alanjt

  • Needs a day job
  • Posts: 5352
  • Standby for witty remark...
Re: Mlisp vs Field ??
« Reply #28 on: October 02, 2009, 02:37:21 PM »
Code: [Select]
(length (layoutlist))

haha good example  :wink:
:) Thought you'd like that.

Ha Ha, where have I seen that one before?  :wink:


I can't wait to try this...  8-)

Did you see my solution. ;)
Civil 3D 2019 ~ Windohz 7 64bit
Dropbox

Andrea

  • Water Moccasin
  • Posts: 2372
Re: Mlisp vs Field ??
« Reply #29 on: October 02, 2009, 03:00:19 PM »
Well....after some test..I have realized that program will be more handy that i've thougth.
For the moment, there is no reactor on it...(making some tests)
but I've created MLISP & MLISPEDIT command..
i'l try to be back next week with the code.
Have a nice weekend all. !   :laugh:



Keep smile...

CHulse

  • Swamp Rat
  • Posts: 504
Re: Mlisp vs Field ??
« Reply #30 on: October 03, 2009, 10:56:01 AM »
Code: [Select]
(length (layoutlist))

haha good example  :wink:
:) Thought you'd like that.



Ha Ha, where have I seen that one before?  :wink:


I can't wait to try this...  8-)

Did you see my solution. ;)


No, I hadn't. ...running to look now....

Cary Hulse
Urban Forestry Manager
Wetland Studies and Solutions

Civil 3D 2020 & 2023

Andrea

  • Water Moccasin
  • Posts: 2372
Re: Mlisp vs Field ??
« Reply #31 on: October 05, 2009, 06:32:10 PM »
ok...

there it is...

MLISP v.1.0
this is my first draft...

command: MLISP  <- create a MTEXT allowing LISP.
command: MLISPEDIT  <- edit MTEXT who have LISP inside.

by pressing ShiftKey...you can see the code inside without editing the MTEXT. :kewl:

need tester..

thanks.  :-)
Keep smile...

SteveK

  • Guest
Re: Mlisp vs Field ??
« Reply #32 on: October 05, 2009, 07:05:40 PM »
Been waiting all week for this  :-) Pretty neat, thanks Andrea.

Aerdvark

  • Guest
Re: Mlisp vs Field ??
« Reply #33 on: October 06, 2009, 02:02:14 AM »
Hi Andrea,

Funny to say, maybe even a little  :ugly: but I can not think of any use for this program.
It looks cool and I wonder how to apply it any time.

I'm following this threat so I am on it...

Andrea

  • Water Moccasin
  • Posts: 2372
Re: Mlisp vs Field ??
« Reply #34 on: October 06, 2009, 08:31:14 AM »
no problem guys...

I'm just sharing the code to free my head a little bit.. :laugh:
Keep smile...

Sebb77

  • Guest
Re: Mlisp vs Field ??
« Reply #35 on: October 06, 2009, 10:02:47 AM »
 :angel:  Really really nice Andrea.
Idea:  your program will be really useful to me, in order to code what shall be an "Auto-Updating Legend" , which i've been thinking about for a couple months.
I'll inform you on the development later down the road. Thanks!

keep lispin'

SteveK

  • Guest
Re: Mlisp vs Field ??
« Reply #36 on: October 06, 2009, 10:09:30 PM »
Funny to say, maybe even a little  :ugly: but I can not think of any use for this program.
It looks cool and I wonder how to apply it any time.
I just think it is a clever tool, somethin different. And I'll be able to learn things from the code.

If I was to use it in projects it would need a function to update all mlisps instead of having to edit each one individually.
And having it for attributes would be very handy, but not sure if that's doable...

Andrea

  • Water Moccasin
  • Posts: 2372
Re: Mlisp vs Field ??
« Reply #37 on: October 07, 2009, 09:20:59 AM »
Funny to say, maybe even a little  :ugly: but I can not think of any use for this program.
It looks cool and I wonder how to apply it any time.
I just think it is a clever tool, somethin different. And I'll be able to learn things from the code.

If I was to use it in projects it would need a function to update all mlisps instead of having to edit each one individually.
And having it for attributes would be very handy, but not sure if that's doable...

Allready done..in test at the moment.. :roll:
Keep smile...

alanjt

  • Needs a day job
  • Posts: 5352
  • Standby for witty remark...
Re: Mlisp vs Field ??
« Reply #38 on: October 07, 2009, 12:27:30 PM »
Funny to say, maybe even a little  :ugly: but I can not think of any use for this program.
It looks cool and I wonder how to apply it any time.
I just think it is a clever tool, somethin different. And I'll be able to learn things from the code.

If I was to use it in projects it would need a function to update all mlisps instead of having to edit each one individually.
And having it for attributes would be very handy, but not sure if that's doable...

Allready done..in test at the moment.. :roll:


Now we're talking. :)
Civil 3D 2019 ~ Windohz 7 64bit
Dropbox

Andrea

  • Water Moccasin
  • Posts: 2372
Re: Mlisp vs Field ??
« Reply #39 on: October 07, 2009, 02:00:26 PM »
update 1

MLISP v.1.1

New Function:

MLISPUPDATE  <- allow to update existing MLISP entity

Command: mlispupdate
(S)elect Entity or (*) for All <*>: S
Select MTEXT entity...

or * to select all

Enjoy !
Keep smile...

SteveK

  • Guest
Re: Mlisp vs Field ??
« Reply #40 on: October 07, 2009, 05:30:27 PM »
Great, thanks  :-)

mkweaver

  • Bull Frog
  • Posts: 352
Re: Mlisp vs Field ??
« Reply #41 on: October 08, 2009, 12:13:24 AM »
Now that is cool!

I'm going to have to spend some time with this.

Thanks for sharing.

Aerdvark

  • Guest
Re: Mlisp vs Field ??
« Reply #42 on: October 08, 2009, 01:58:13 AM »
No very often I felt so  :? for I really can't think of the use... I know, due to my lack of knowledge... :oops:

What you are trying to say with the last gif, is that a drawing list that can be updated if one of the titleblocks is modified?
ie.: the dwg itself contains 5 identical title blocks with 5 identical attribute tags.
The attribute values differ of course.

Can you put these values (like E001 E002 etc) in the mlisp?
If so, then YES I and many others will have great use for it!
Creating drawing list!

If you'd need a tester for that, I'm here!

Andrea

  • Water Moccasin
  • Posts: 2372
Re: Mlisp vs Field ??
« Reply #43 on: October 08, 2009, 01:05:40 PM »
No very often I felt so  :? for I really can't think of the use... I know, due to my lack of knowledge... :oops:

What you are trying to say with the last gif, is that a drawing list that can be updated if one of the titleblocks is modified?
ie.: the dwg itself contains 5 identical title blocks with 5 identical attribute tags.
The attribute values differ of course.
Absolutely...you can do what LISP can make.
In ObjectDBX you can retreive theses Values..
But for the Gif Exemble...I only take the DWG list drawing name in the curent folder.

Can you put these values (like E001 E002 etc) in the mlisp?
YES !

If so, then YES I and many others will have great use for it!
Creating drawing list!

If you'd need a tester for that, I'm here!

Thanks...
If you have any experimental problem...please let me know.

Enjoy !
Keep smile...