View Full Version : Insert list of block names in a txt file
aharris
2006-11-14, 05:13 PM
It's been too long time ago and I hope someone can help me. I have a long list of blocks that needs to inserted inside a dwg that came from a database. How do I make a lsp program to insert this list that in a text file? I remember doing it...about 5 years ago!!!
Thanks for any help!!!
Hi
I have a read your task five times but have no luck with
understanding with your problem exactly
Okay, let me guess about it:
- You have a file with list of blocks you need to insert in your drawing
- What is this database? Is this Access database or text file or Excel file or something
else
How is written a data into it (i.e. block name, insertion point, attribute values)
etc
There is not clear enough to solve your task, sorry
Better yet you need to attach some samples I think...
Maybe I am so stupid though :)
~'J'~
Have you tried a search of the AutoLISP forum for insert block (http://forums.augi.com/search.php?query=insert+block&searchuser=&exactname=0&starteronly=0&forumchoice=91&childforums=1&titleonly=0&showposts=0&searchdate=&beforeafter=&sortby=&sortorder=&replyless=0&replylimit=0&searchthread=0&searchthreadid=0&saveprefs=0&do=process)?
aharris
2006-11-14, 10:09 PM
Okay, I thought maybe I made it too general. I have a file that I made from a database that stored x,y, scale, block name, etc. So I kicked that out to a txt file that looks something like this:
-INSERT
BLOCKNAME
1578654,11593770
1
1
89.51319633
ATTRIBUTE1
ATTRIBUTE2
ATTRIBUTE3
ATTRIBUTE4
ATTRIBUTE5
-INSERT
BLOCKNAME
1595206,11598380
1
1
1
270.3902427
ATTRIBUTE1
ATTRIBUTE2
ATTRIBUTE3
ATTRIBUTE4
ATTRIBUTE5
.
.
.
.
Which is the insert command, "x,y", y scale, x scale, rotation, then all the attribute info for the block.
How to I make this list just run in AutoCAD? Make anymore since??? :)
aharris
2006-11-14, 10:13 PM
Have you tried a search of the AutoLISP forum for insert block (http://forums.augi.com/search.php?query=insert+block&searchuser=&exactname=0&starteronly=0&forumchoice=91&childforums=1&titleonly=0&showposts=0&searchdate=&beforeafter=&sortby=&sortorder=&replyless=0&replylimit=0&searchthread=0&searchthreadid=0&saveprefs=0&do=process)?
Yea I looked, but couldn't find anything about long list of inserts....which I should have made more clear in my first post - my bad...;)
Have you tried renaming it with a .SCR file extension? That is what it looks like to me.
aharris
2006-11-14, 10:35 PM
Have you tried renaming it with a .SCR file extension? That is what it looks like to me.
I think that's it!!! I knew it was simple...just after 5 years of drinking and ...well, never mind.. :)
Thanks!!!
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.