.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

AutoCAD .NET read block attribute

3 REPLIES 3
Reply
Message 1 of 4
ti
Participant
1454 Views, 3 Replies

AutoCAD .NET read block attribute

Hi,

I started a little project using AutoCAD 2008 and Visual Studio 2005 in VB, I can click a block and loop through all the block attributes but what I would like to do is click a particular attribute and get only the attribute's textstring. I can do it in VBA but I really need this to work with VB.NET.

Can anyone help me or point me to a tutorial ?

I already read that blog post but can't adapt it to my needs.
http://through-the-interface.typepad.com/through_the_interface/2006/09/getting_autocad.html

Thanks!
3 REPLIES 3
Message 2 of 4
Anonymous
in reply to: ti


You can use the Editor's GetNestedEntity() method to
select

an attribute in a block insertion. The ObjectId of the
attribute

will let you open it and get its value.

 

See if you can get it working on your own, and if you
have

a problem, post your attempt here and we can help
you

with it.


 

AcadXTabs: MDI Document Tabs for AutoCAD 2009
Supporting AutoCAD 2000
through 2009

href="http://www.acadxtabs.com">http://www.acadxtabs.com

 


 

 


style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
Hi,
I started a little project using AutoCAD 2008 and Visual Studio 2005 in VB, I
can click a block and loop through all the block attributes but what I would
like to do is click a particular attribute and get only the attribute's
textstring. I can do it in VBA but I really need this to work with VB.NET. Can
anyone help me or point me to a tutorial ? I already read that blog post but
can't adapt it to my needs.
http://through-the-interface.typepad.com/through_the_interface/2006/09/getting_autocad.html
Thanks!
Message 3 of 4
ti
Participant
in reply to: ti

Thanks, I'll work on it and let you know.
Message 4 of 4
ti
Participant
in reply to: ti

ok, I got it running but I have a few questions.

1. When I call my command, the whole drawing seems to be highlighted or maybe it highlights the whole block, is it possible to only hightlight the block attribute or turn off the highlighting ?

2. If I need to click more than 1 attribute before getting back to my form, is there a property for that or should I prompt the user with the command line ?

Thanks a lot for your help !

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost