Community
Civil 3D Customization
Welcome to Autodesk’s AutoCAD Civil 3D Forums. Share your knowledge, ask questions, and explore popular AutoCAD Civil 3D Customization topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Must I reference different interop refs for different c3d versions?

5 REPLIES 5
SOLVED
Reply
Message 1 of 6
JamesMaeding
395 Views, 5 Replies

Must I reference different interop refs for different c3d versions?

I have not paid much attention to this as I do not use com methods for much in .net civil3d progs.

I do it for surface sample methods, and just realized my 2013 is broke because I changed the interop references to 2014.

 

Its easy to forget this, because you can reference 2014 .net assemblies, and 2013 knows to find the 2013 ones.

 

Am I going crazy?

So I must have 2013 installed to recompile progs for 2013, right?

Is there a way to just have the com assemblies for 2013 available without installing it?

I want to minimize installed acad's.


internal protected virtual unsafe Human() : mostlyHarmless
I'm just here for the Shelties

5 REPLIES 5
Message 2 of 6
Jeff_M
in reply to: JamesMaeding


@Anonymous wrote:

 

Am I going crazy?

So I must have 2013 installed to recompile progs for 2013, right?

Is there a way to just have the com assemblies for 2013 available without installing it?


Maybe? 🙂

Right.

No & Yes.

 

Since I always get the ObjectARX20XX libraries and keep them available, when I first install any version of C3D I copy the Interops to the appropriate ObjectARX inc-xXX folder. Then I set my references there instead of the install folder.

 

Which Sample methods are you needing that aren't in the later .NET API?

 

However, I've abandoned even that method and now use Reflection to late-bind any COM methods/properties I still need. Therefor I never need to reference the Interops at all (except for my SSM needs, but no C3D Interops are needed for that).

Jeff_M, also a frequent Swamper
EESignature
Message 3 of 6
JamesMaeding
in reply to: Jeff_M

I use:

 

//get profile along line between pt1 and 2

double[] sampRet = surf.SampleElevations(pt1.X, pt1.Y, pt2.X, pt2.Y) asdouble[];

 

which is a bit junky as you must chord arcs to cut profiles


internal protected virtual unsafe Human() : mostlyHarmless
I'm just here for the Shelties

Message 4 of 6
Jeff_M
in reply to: JamesMaeding

In that case, drop the COM for 2014+ Smiley Very Happy The TinSurface object now exposes this, which allows curved objects:

 

public Point3dCollection SampleElevations(
	ObjectId curveId
)
Jeff_M, also a frequent Swamper
EESignature
Message 5 of 6
JamesMaeding
in reply to: Jeff_M

hmm, I had looked for that too. awesome!

Hope that was all I needed from com, I will review the other functions.


internal protected virtual unsafe Human() : mostlyHarmless
I'm just here for the Shelties

Message 6 of 6
JamesMaeding
in reply to: Jeff_M

I reviewed my code, and found I was using these methods:

surf.IntersectPointWithSurface(dPt, dVec)

surf.SampleElevations(pt1.X, pt1.Y, pt2.X, pt2.Y)

 

and low and behold, IntersectPointWithSurface(dPt, dVec) is surface.GetIntersectionPoint in .net.

 

I gotta look around more.

I have to admint though, ever since I found the Ceometric .net surface libraries, I focus more on what I can do with that so all my tools work in BricsCad too.

 

 

 


internal protected virtual unsafe Human() : mostlyHarmless
I'm just here for the Shelties

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

Post to forums  

Rail Community


 

Autodesk Design & Make Report