.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 P/Invoke acdbGetCur VportTable RecordId for AutoCAD 2008?
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
110 Views, 2 Replies
01-08-2012 08:59 AM
[DllImport("acdb17.dll", CallingConvention = CallingConvention.Cdecl, EntryPoint = "?acdbGetCurVportTableRecordId@@YA?AVAcDbObjectId@ @PAVAcDbDatabase@@@Z")]
private extern static ObjectId acdbGetCurVportTableRecordId(IntPtr dbObject);
public static ObjectId CurrentViewportTableRecordId(this Database db)
{
return acdbGetCurVportTableRecordId(db.UnmanagedObject);
}When i call the CurrentViewportTableRecordId function,I get System.AccessViolationException exception.
Any help?
Re: How to P/Invoke acdbGetCur VportTable RecordId for AutoCAD 2008?
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
01-08-2012 09:50 AM in reply to:
csharpbird
Hi,
why do you use invoking for that? Looking into the object-browser I found (for 17.1):
Public ReadOnly Property CurrentViewportObjectId() As Autodesk.AutoCAD.DatabaseServices.ObjectId
Member von Autodesk.AutoCAD.EditorInput.Editor
Is that also ok? ![]()
- alfred -
-------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at
-------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at
-------------------------------------------------------------------------
Re: How to P/Invoke acdbGetCur VportTable RecordId for AutoCAD 2008?
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
01-08-2012 05:05 PM in reply to:
alfred.neswadba
Thanks for your reply.
But it seems that you cannot P/Invoke the functions wich return an ObjectId value.
