Exchange Forum > Dcl Dialogs
General Drawing Symbol Blocks w/o The Blocks
Page 1 of 2
1 2
General Drawing Symbol Blocks w/o The Blocks

#1

Buzzard
Join Date:
12-25-2007
The attached file contains a lisp routine, dcl file and slides for a General
Drawing Symbol library that creates blocks from within the program by
way of DXF data. Place all contents in one folder. Make sure that folder
is in the ACAD search path. Type GDS to start. Double click a slide and
the program will create the block and insert it.
 
Thanks and Enjoy
The Buzzard

Attachments  GDS.zip  
General Drawing Symbol Blocks w/o The Blocks

#2

Rasmussen
Join Date:
12-10-2007
Buzzard,
This program is very well written and very well documented in the code. You have very good examples of creating blocks on the fly within the library code. Nice work.
 
Rasmussen
General Drawing Symbol Blocks w/o The Blocks

#3

Buzzard
Join Date:
12-25-2007
Thank you.
 
One of the things I like about it, Is the fact that you do not need to store
or search for the blocks. Also the layers being set before insertion, you do
not have to think about it.
 
I do not recommend this method for highly detailed blocks because it becomes alot of work. Its great for symbol libraries or objects with limited
amount of detail.
 
Again Thanks and Enjoy,
The Buzzard
General Drawing Symbol Blocks w/o The Blocks

#4

Zeanor
Join Date:
07-26-2007
Buzzard,
I certainly agree with Rasmussen, your program is very well written and documented. This may be off the subject, but I notice how you made use of the entmake function to create entities in your blocks. I have often wondered if it's possible to write an AutoLISP function that your can just select a block or entities and it's writes the necessary code that you can just copy and paste into your own function to recreate the block and entities without having to insert a block. I know that blocks can very complex and maybe that wouldn't be the first attempt to write a function like this. Probably just writing a function that writes the code necessary for recreating general AutoCAD entities that you can just copy and paste the code into your own function.
You have a great program here, and I like the way you write AutoLISP.
Zeanor
General Drawing Symbol Blocks w/o The Blocks

#5

Buzzard
Join Date:
12-25-2007
Thanks Zeanor,
I used a small program that extracts the DXF information from an entity on screen. You can only do one entity at a time because the program is written to bring up data on the last object that was created. I also found out thru trial and error that the order of the DXF information matters on certain objects or your program will not function. It pays just to use the order that it is displayed in. Also there is information at the top that has to do with handle information that must be left out or this will also give you problems. I will post it on my next post and you can try it out. You just need to place your objects with respect to it insertion point. Use the block library program I provided and place one of the objects at 0,0 and explode it. Then you would remove all object except for one. Run the PRINTDXF program and a text box will appear on screen with this information. Compare the information to the objects data that is in the program and you will see how this was done. With regard to the program format, I chose this method because it is easy to spot quotations out of place as well as spelling error in the variables. It is also much easier to read and understand since the comments are off to the side and not between the coding.
I also prefer to comment every line for the benefit of others as well as myself. You may have also noticed that I wrote it in a longer format that could have been shortened, But I also chose not to do this because its is for the benefit of others that are learning the basics of programming and they will see repetative use of lisp commands and program variables that eventually it may sink in.
Once Again Thanks and Enjoy,
Buzzard
P.S.
Look for the PRINTDXF program on the next post.
I do not remember who wrote it but it helps make block programs like the one I posted possible.
General Drawing Symbol Blocks w/o The Blocks

#6

Buzzard
Join Date:
12-25-2007
Here is the PRINTDXF.lsp program I used to get the information to create the block references in my program. Follow the guidelines I mentioned above and you should have very little in the way of problems. Under the
help section in developer help is an elbaorate section on DXF code and will explain what the coding means. When you run the program and the text screen apears with the DXF information, You just copy and paste it into your program. Remove what is not needed as I have outlined above. Just refer to my program and you will see what I mean.
 
Hope to see some fine program examples.

Attachments  PRINTDXF.lsp  
General Drawing Symbol Blocks w/o The Blocks

#7

J Moreno
Join Date:
07-30-2007
Hi,
I loaded it and ran it, and was wondering what all that data was. It was the dxf information of the title block that I had just inserted into my drawing. So that's how you do it. Then you probably do a cut and paste from the text screen. Neat!
General Drawing Symbol Blocks w/o The Blocks

#8

Buzzard
Join Date:
12-25-2007
You got it!
Just keep in mind that some of that data is handle information and does not occur till after insertion. So when you make your program, Be sure to leave that part out. Just compare it to the way I wrote it and you will understand what I mean. Also keep in mind that it only returned the DXF data of the last object created. So that DXF data you are viewing is only the last object in your border. You can only do one entity at a time. The way my symbol program is written will reassemble all of that data into one block. So study it carefully.
 
Glad you got it and hope to see some example from you.
Enjoy! The Buzzard
General Drawing Symbol Blocks w/o The Blocks

#9

Buzzard
Join Date:
12-25-2007
I want to inform everyone that a new version of this program will be available soon. I will be using a method introduced to me by the Viper that will eliminate the slides and replace them by creating them from within the program.
 
Be sure to look for it.
 
Thanks,
The Buzzard
General Drawing Symbol Blocks w/o The Blocks

#10

J Moreno
Join Date:
07-30-2007
Buzzard,
I like your PrintDxf program. Can you write me a version so that I can just pick or select any object to see that dxf code on the flip screen? If that's OK.
Page 1 of 2
1 2