Message 1 of 5
vb(not VBA) and blocks

Not applicable
12-03-2007
09:48 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi, i need some help getting started with vb development for autocad 2007.
First I am fairly confused about objectARX, VB.net etc, but i think i understand it enough to know that I can use vb to write code that i can load with the NETLOAD command from AutoCAD and execute it providing the commands i defined. so far so good.
Problem is that I am now trying to access/retrieve the list of all blocks that are defined in a drawing and I can't figure out how.
this is how i open the file:
Dim file as autodesk,autocad.applicationservices.document
file = application.documentmanager.open("myfile.dwg",false)
now that i have that file open i need to figure out how to get the blocks, find the one i am looking for (title block) and insert a new title block with the same name as the existing one so that i can redefine it.
any help will be appreciated, since the api docs are not offering a lot of help at this point since they don't show any examples.
thank you
First I am fairly confused about objectARX, VB.net etc, but i think i understand it enough to know that I can use vb to write code that i can load with the NETLOAD command from AutoCAD and execute it providing the commands i defined. so far so good.
Problem is that I am now trying to access/retrieve the list of all blocks that are defined in a drawing and I can't figure out how.
this is how i open the file:
Dim file as autodesk,autocad.applicationservices.document
file = application.documentmanager.open("myfile.dwg",false)
now that i have that file open i need to figure out how to get the blocks, find the one i am looking for (title block) and insert a new title block with the same name as the existing one so that i can redefine it.
any help will be appreciated, since the api docs are not offering a lot of help at this point since they don't show any examples.
thank you