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

opening dwg file using C# and RealDWG

5 REPLIES 5
Reply
Message 1 of 6
Anonymous
2605 Views, 5 Replies

opening dwg file using C# and RealDWG

I am using visual studio 2005 and RealDWG 2009 and I trying to open the dwg file using realdwg library in c# application and following is my source code.

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Autodesk.AutoCAD.DatabaseServices;
namespace RealDWGTest
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
*InitializeRealDwgComponents(); // This line shows the error*
}

private void InitializeRealDwgComponents()
{
Autodesk.AutoCAD.Runtime.RuntimeSystem.Initialize(new RealDWGApp(), 1033);
Database db = new Database();
db.ReadDwgFile("C:\test.dwg", FileOpenMode.OpenForReadAndAllShare, true, "");
}
}

public class RealDWGApp : Autodesk.AutoCAD.DatabaseServices.HostApplicationServices
{
public override string FindFile(string fileName, Database database, FindFileHint hint)
{
throw new Exception("The method or operation is not implemented.");
}
}
}




When I try to run this program following error occurred:
"Could not load file or assembly 'acdbmgd, Version=17.2.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified."


Please help to solve this problem.

Edited by: mmtechnologies on Sep 25, 2008 6:40 PM Edited by: mmtechnologies on Sep 25, 2008 6:44 PM
5 REPLIES 5
Message 2 of 6
Anonymous
in reply to: Anonymous

Sorry, your code is being reformatted by the web interface, which I'm not using. Hopefully, someone else that can help is.

This is a major problem with the new discussion group software, and clearly one they had have been aware of before they rolled it out, so I would have to guess that it's intentional, and that they're trying to force the use of the web interface rather than NNTP.

The web interface still stinks.... one of the worst I've ever seen.

--
http://www.caddzone.com

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

http://www.acadxtabs.com

Introducing AcadXTabs 2010:
http://www.caddzone.com/acadxtabs/AcadXTabs2010.htm

wrote in message news:6038352@discussion.autodesk.com...
I am using visual studio 2005 and RealDWG 2009 and I trying to open the dwg file using realdwg library in c# application and following is my source code. using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using Autodesk.AutoCAD.DatabaseServices; namespace RealDWGTest { public partial class Form1 : Form { public Form1() { InitializeComponent(); *InitializeRealDwgComponents(); // This line shows the error* } private void InitializeRealDwgComponents() { Autodesk.AutoCAD.Runtime.RuntimeSystem.Initialize(new RealDWGApp(), 1033); Database db = new Database(); db.ReadDwgFile("C:\test.dwg", FileOpenMode.OpenForReadAndAllShare, true, ""); } } public class RealDWGApp : Autodesk.AutoCAD.DatabaseServices.HostApplicationServices { public override string FindFile(string fileName, Database database, FindFileHint hint) { throw new Exception("The method or operation is not implemented."); } } } When I try to run this program following error occurred: "Could not load file or assembly 'acdbmgd, Version=17.2.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified." Please help to solve this problem. Edited by: mmtechnologies on Sep 25, 2008 6:40 PM Edited by: mmtechnologies on Sep 25, 2008 6:44 PM
Message 3 of 6
Anonymous
in reply to: Anonymous

Hi.

I guess you've solved your situation long time ago. I'd check the references-list, acdbmgd.dll has to be correctly referrenced in order to use the Autodesk.AutoCAD.Runtime namespace. Eventually add the reference once again from the AutoDesk installation folder.

AndersØ
Message 4 of 6
Anonymous
in reply to: Anonymous

I was wondering if anyone has resolved this issue.

We have this same problem, though with a twist:

Our development machine can build and run RealDWG based applications without a problem. We tried to migrate the development to another machine and run into this error.

The new machine has the same setup for VS and RealDWG as the current development machine.

We tried to build a deployment and get the same error!

None of the samples provided with RealDWG work on the new development machine; same error!
Message 5 of 6
Anonymous
in reply to: Anonymous

We are having the SAME issue. Any fix?

We have been using one machine for development of our RealDWG based solution. We are now trying to migrate this to another machine for additional development and are getting an error regarding the acdbmgd.dll reference. We have tried to develop a deployment of the solution as a consoleapp or as a webservice and the error is replicated each time.



This issue is pervasive as we get the error when trying to run the samples provided with RealDWG.



Again, it works on our development machine but not on additional machines.
Message 6 of 6
wgmdev
in reply to: Anonymous

Hi,

I am newbie in using RealDWG.
Can anybody please tell me, does RealDWG support Windows Server(2003/2008) platforms?

Thanks,
Praful

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

Post to forums  

Autodesk Design & Make Report

”Boost