There are a few functions out there that make image files using wmf files.
To keep my function short I just ask a few questions from the command line. You can modify it as you want to.
The x and y values default to the size I commonly use for my slide files, and are based upon the ratio of the screen size.
Zoom in on the objects you want to create the code for your image file.
The top left corner of your screen is the insertion point of the wmf file, so you may have to pan or zoom to get it looking like you want it to. If the x and y values that you choose are more square than the ratio of your screen size, it uses the height of the screen size, else it uses the width of the screen size and always starts from the top left corner.
The function names are Mimage to make an image, and Vimage to view an image.
To change the folder where it saves the image files, edit the last lines in the file.
The latest revision to Mimage.lsp is attached here.
Newsday calls it: "A walk in the park with rocket boosters on."
The Buzzard calls it: "Enjoying the after effects from a gallon of Red Bull."
President George Bush says: "Did I miss something here?"
But no kidding, Thats going to make my programming less stressfull.
Thank You Big "V"
I will sing its praises when I repost my Drawing Notes & Legends Lisp.
Thanks Buzzard,
I found a slight problem with blocks with attributes that I worked out this morning and uploaded the newer version to the first post.
Sorry about that.
Viper
Viper,
I think this one has some great possibilities. Have you given any thought to adding a front end dialog to drive the user inputs? The Vimage function is very fast for viewing what you just did. It seems to be about equally fast as viewing slides. I noticed that it took a little bit longer to create more complicated images, but it would have taken me hours doing it with just one vector_image call at a time.
Bennett
I have reposted my Drawing Notes & Legends Lisp with the new changes I wanted to make with regard to the slides. I have used your program as you already know and I am very pleased with the results. In my program under the Acknowledgements section I have made reference to your program being responcible for the slides section. I have also added the link to this thread as well.
I am planning on starting a new thread for symbols libraries for all of the disciplines. I will be making extensive use of your program and will make mention of it in those programs also.
You're welcome! There are a few things I could have improved upon. Such as using the trans function instead, but it gets the job done with a lot less work. Remember that you can also not choose the background, and it makes it look like you are drawing on the dialog itself. i.e. You could put your logo (Buzzard) in some cool font in a image tile near the bottom.
I'm glad you are liking it. It could be formatted better. Did you download the latest version that works better with blocks with attributes?
Viper
Yes, I saw your post about the fixes. So I have the latest copy. I had used it on regular polylines and text and did not have a problem. The slides look like ordinary slides. I like the aspect ratio of the tiles as well. I will give it a trial on the blocks with attributes and let you know how it went.
I just tested it on a block with attributes and had no problems with it. Great Job!. One thing that I noticed is that lists for the blocks are much smaller and simple to deal with. This will be easy for a block library with alot of blocks in it because I will spend less time formating the code. This without a doubt is much better way to deal with slides than mslide for sure.
Buzzard,
I had a chance to download and look at your code. Thanks for the acknowledgments. I appreciate that. I noticed the way you format your lists in your code. I wrote a little function called Align which I will add in a minute. I'd like you to test it out with a copy of Mimage.lsp like Mimage2.lsp. I didn't want to make a revision unless it's going to work for most programmers. I set it up to only align numbers less that 1000. Normally the numbers are less than 1000, or you will get that AutoCAD message stating that the dialog is too big to fit on your screen. Beta test it please, and let me know if it's helpful in formatting the lists.
Viper
Here's the code where it applies:
You will replace the five itoa with Align.
Code:
(if Objects
(progn
(setq LspList (append LspList (list " (mapcar 'vector_image")))
(setq Line " (list") (foreach Number X1s (setq Line (strcat Line " " (itoa Number)))) (setq Line (strcat Line ")"))
(setq LspList (append LspList (list Line)))
(setq Line " (list") (foreach Number Y1s (setq Line (strcat Line " " (itoa Number)))) (setq Line (strcat Line ")"))
(setq LspList (append LspList (list Line)))
(setq Line " (list") (foreach Number X2s (setq Line (strcat Line " " (itoa Number)))) (setq Line (strcat Line ")"))
(setq LspList (append LspList (list Line)))
(setq Line " (list") (foreach Number Y2s (setq Line (strcat Line " " (itoa Number)))) (setq Line (strcat Line ")"))
(setq LspList (append LspList (list Line)))
(setq Line " (list") (foreach Number Colors (setq Line (strcat Line " " (itoa Number)))) (setq Line (strcat Line ")"))
(setq LspList (append LspList (list Line " )")))
)
)
Here is what the revision should look like:
All five itoa were changed to Align.
Code:
(if Objects
(progn
(setq LspList (append LspList (list " (mapcar 'vector_image")))
(setq Line " (list") (foreach Number X1s (setq Line (strcat Line " " (Align Number)))) (setq Line (strcat Line ")"))
(setq LspList (append LspList (list Line)))
(setq Line " (list") (foreach Number Y1s (setq Line (strcat Line " " (Align Number)))) (setq Line (strcat Line ")"))
(setq LspList (append LspList (list Line)))
(setq Line " (list") (foreach Number X2s (setq Line (strcat Line " " (Align Number)))) (setq Line (strcat Line ")"))
(setq LspList (append LspList (list Line)))
(setq Line " (list") (foreach Number Y2s (setq Line (strcat Line " " (Align Number)))) (setq Line (strcat Line ")"))
(setq LspList (append LspList (list Line)))
(setq Line " (list") (foreach Number Colors (setq Line (strcat Line " " (Align Number)))) (setq Line (strcat Line ")"))
(setq LspList (append LspList (list Line " )")))
)
)