.NET

Reply
Active Member
spitfire41
Posts: 7
Registered: ‎03-17-2006
Message 1 of 4 (145 Views)

Changing Attributes of a known Block Name

145 Views, 3 Replies
03-21-2006 09:53 AM
Hey all,

I am somewhat experienced with .NET but have never used it much with the AutoCAD API until now.

I have a known titeblock name which I need to use in order to read, and more importantly change its attribute values. I am having a real heck of a time muddling throught the objects in the AutoCAD API in order to achieve this with VB.NET. After I tie the proper objects into my titleblock I have a set of named attributes (tags) I must search and change.

I am having a real problem finding any examples on the 'net that don't refer to LISP or VB6. There are some examples in the AutoCAD 2002 developer's manual but they all involve adding new blocks to a drawing and very simplistic forms of editing.
Active Contributor
jimmie_fulton
Posts: 44
Registered: ‎04-06-2005
Message 2 of 4 (145 Views)

Re: Changing Attributes of a known Block Name

03-21-2006 10:32 AM in reply to: spitfire41
I've attached some code (c#, sorry) that finds a particular block in the drawing, and then finds the next 5 blank attributes within the bloc and writes values to it. Hopefully, this will get you started...
Active Member
spitfire41
Posts: 7
Registered: ‎03-17-2006
Message 3 of 4 (145 Views)

Re: Changing Attributes of a known Block Name

03-21-2006 10:41 AM in reply to: spitfire41
Jimmie,

Thank you very much for the code, much appreciated. Although I know nothing about C# I do have access to developers who can convert it for me if necessary. Thanks again.
Distinguished Contributor
Alexander Rivilis
Posts: 303
Registered: ‎09-26-2004
Message 4 of 4 (145 Views)

Re: Changing Attributes of a known Block Name

03-21-2006 11:45 AM in reply to: spitfire41
Try this converter: http://kamalpatel.net/ConvertCSharp2VB.aspx
Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.