.NET
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
How to get the type of arrowhead for the dimension?
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
93 Views, 2 Replies
07-04-2005 05:23 PM
I have tried the Dimblk1 property,but it does not work.Can someone
solve this problem?Thanks in advance.
solve this problem?Thanks in advance.
*Albert Szilvasy
Re: How to get the type of arrowhead for the dimension?
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
07-05-2005 08:16 AM in reply to:
tangferry
Can you describe the problem in a bit more detail? What happened when you
called this property? Did it throw and exception? If so, what exception was
thrown?
ALbert
wrote in message news:4892398@discussion.autodesk.com...
I have tried the Dimblk1 property,but it does not work.Can someone
solve this problem?Thanks in advance.
called this property? Did it throw and exception? If so, what exception was
thrown?
ALbert
I have tried the Dimblk1 property,but it does not work.Can someone
solve this problem?Thanks in advance.
Re: How to get the type of arrowhead for the dimension?
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
07-05-2005 08:05 PM in reply to:
tangferry
This is my codes:
[CommandMethod("Test")]
static public void test() // This method can have any name
{
// Put your command code here
Editor ed=Application.DocumentManager.MdiActiveDocument.E ditor;
ObjectId id=ed.GetEntity("Select an entity").ObjectId;
Database db=Application.DocumentManager.MdiActiveDocument.D atabase;
DBTransMan tm=db.TransactionManager;
using(Transaction trans=tm.StartTransaction())
{
Dimension dim=(Dimension)tm.GetObject(id,OpenMode.ForRead);
ObjectId dimId=dim.Dimblk1;
DBObject obj=tm.GetObject(dimId,OpenMode.ForRead);
ed.WriteMessage(obj.GetType().ToString());
}
}
When I run this program,I get the following exception:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> Autodesk.AutoCAD.Runtime.Exception: eInvalidObjectId
[CommandMethod("Test")]
static public void test() // This method can have any name
{
// Put your command code here
Editor ed=Application.DocumentManager.MdiActiveDocument.E
ObjectId id=ed.GetEntity("Select an entity").ObjectId;
Database db=Application.DocumentManager.MdiActiveDocument.D
DBTransMan tm=db.TransactionManager;
using(Transaction trans=tm.StartTransaction())
{
Dimension dim=(Dimension)tm.GetObject(id,OpenMode.ForRead);
ObjectId dimId=dim.Dimblk1;
DBObject obj=tm.GetObject(dimId,OpenMode.ForRead);
ed.WriteMessage(obj.GetType().ToString());
}
}
When I run this program,I get the following exception:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> Autodesk.AutoCAD.Runtime.Exception: eInvalidObjectId
