Author Topic: Missing Reference  (Read 4356 times)

0 Members and 1 Guest are viewing this topic.

daron

  • Guest
Missing Reference
« on: April 15, 2008, 11:41:53 AM »
I'm trying to learn C# using some things that I found here. I've gone through and when I compile, it gives me a "The type of namespace name 'Runtime' does not exist in the namespace 'Autodesk.AutoCAD' (are you missing an assembly reference?) (CS0234).
I have the Autodesk.AutoCAD.Interop.Common and .Interop references loaded. Attached is an image of the references available. Which one do I need to load?

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Missing Reference
« Reply #1 on: April 15, 2008, 11:46:04 AM »
Did you add the two dll files?  acdbmgd.dll and acmgd.dll
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

daron

  • Guest
Re: Missing Reference
« Reply #2 on: April 15, 2008, 11:48:44 AM »
I read about them. I've seen comments on adding them. I know how to find them. Somewhere along the line, I was misled that adding the two references took care of this. I will try to add them, but in case I can't figure it out, I'll ask. Do I add them through the references dialog?

Thanks, Tim.

It's Alive!

  • Retired
  • Needs a day job
  • Posts: 8797
  • AKA Daniel
Re: Missing Reference
« Reply #3 on: April 15, 2008, 11:49:32 AM »
.

daron

  • Guest
Re: Missing Reference
« Reply #4 on: April 15, 2008, 11:52:55 AM »
Awesome. Thanks Daniel. I was looking in the wrong place. I was just about to say I didn't find them where I read I was supposed to, which was in C:/Windows/Vis...Studio/blah blah/etc.

Thanks for that.

It's Alive!

  • Retired
  • Needs a day job
  • Posts: 8797
  • AKA Daniel
Re: Missing Reference
« Reply #5 on: April 15, 2008, 11:56:09 AM »
You are welcome, Also set the property copy local to false (for both dlls)

Glenn R

  • Guest
Re: Missing Reference
« Reply #6 on: April 15, 2008, 12:09:43 PM »
...and unless you are particularly using the acad COM API, axe the 2 interop references from your project as well.

It's Alive!

  • Retired
  • Needs a day job
  • Posts: 8797
  • AKA Daniel
Re: Missing Reference
« Reply #7 on: April 15, 2008, 12:19:14 PM »
...and unless you are particularly using the acad COM API, axe the 2 interop references from your project as well.

Good call Glenn, AXE the COM stuff.

daron

  • Guest
Re: Missing Reference
« Reply #8 on: April 15, 2008, 02:02:19 PM »
Okay. I had no idea as I was just following a tutorial that was linked to some time ago. It's funny that of all 6 of the references that appear to be used in what I was following, only:
using Autodesk.AutoCAD.DatabaseServices;
appears to be used.
This is everything that was told to be used:
using System.Runtime.InteropServices;
using Autodesk.AutoCAD.Runtime;
using Autodesk.AutoCAD.ApplicationServices;
using Autodesk.AutoCAD.DatabaseServices;
using Autodesk.AutoCAD.EditorInput;
using acadApp = Autodesk.AutoCAD.ApplicationServices.Application;

Reference

It's Alive!

  • Retired
  • Needs a day job
  • Posts: 8797
  • AKA Daniel
Re: Missing Reference
« Reply #9 on: April 15, 2008, 09:50:27 PM »
It’s fine to leave the extras in, What’s not used is not compiled in. I use this as my standard (borrowed from KWB)

Code: [Select]
using Autodesk.AutoCAD.Runtime;
using Autodesk.AutoCAD.Windows;
using Autodesk.AutoCAD.Geometry;
using Autodesk.AutoCAD.EditorInput;
using Autodesk.AutoCAD.LayerManager;
using Autodesk.AutoCAD.ApplicationServices;
using Autodesk.AutoCAD.DatabaseServices;

using AcAp = Autodesk.AutoCAD.ApplicationServices;
using AcEd = Autodesk.AutoCAD.EditorInput;
using AcGe = Autodesk.AutoCAD.Geometry;
using AcRx = Autodesk.AutoCAD.Runtime;
using AcDb = Autodesk.AutoCAD.DatabaseServices;
using AcWd = Autodesk.AutoCAD.Windows;

daron

  • Guest
Re: Missing Reference
« Reply #10 on: April 16, 2008, 12:15:01 PM »
Good to know. Thanks. We have a small IronPython group here, don't we? I ask because python, to me makes sense and this statement from the boo manifesto quoted below, makes so much sense to me. If not, it's good humor. I'd hope that IPython is better than Boo. Does anyone know of some good tutorials on IronPython or Boo for the absolute beginner with compiled languages?
Quote
Classes are not needed
The guys who came up with “public static void main” were probably kidding, the
problem is that most people didn't get it was a joke. The infamous HelloWorld in all its
boo glory:
print("Hello, world!")
“public static void main”, that was a good one!

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Missing Reference
« Reply #11 on: April 16, 2008, 12:26:35 PM »
I think I got this site from Tim R. back when I was looking at maybe going into Python.

http://boo.codehaus.org/Home

It is the home page, but one the right there is a link to some tutorials.
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.