At AU 2008 David Garigues presented a class "Caffeinated Grading" in which he used some VBA macros. The VBA code was shared as part of the class and posted the the now defunct CivilCommunity files section. Starting with C3D2010 the VBA DVB was included under the Samples folder in a typical C3D installation, but the code was not kept up to date. And with VBA being phased out, it seemed like the logical choice was to port the code to a .NET DLL.
As it turned out, Justin Ralston and I somehow managed to to be thinking the same thing, at about the same time. He chose to go the VB.NET route, and I chose C# as the program language. The 2 versions may be slightly different (I have not tested his code) but they should yield the same results.
And with that, I am attaching the complete VS2008 C# solutions, along with the Readme.txt, in a ZIP. Due to C3D not having a .NET managed API for Surfaces until 2012, the code uses the COM libraries. This means each version of C3D needs it's own version of this DLL. The code is included for all 3 versions of C3D 2010-2012.
There are likley better ways to do some of the things in this code using native .NET methods, but I decided to focus on just getting the code ported over with minimal changes to the original. I hope some of you find it useful, both the new commands and the example code.
Solved! Go to Solution.
Solved by Jeff_M. Go to Solution.
Jeff
Thanks, I was able to run it multpile times last night as well but then sometimes in crashed out. I will have to pay extra attention to my workflow and see if I can figure out why.
Alfred
I am playing around setting up Virtual box with 32bit Civil3d installed to use edit continue debugging and have added the loadfromeremotesource switch to the config file but is it does not seem to work on the virtual machine. Have you experienced this before? or have any suggestions of work it could be.
Hi,
>> have added the loadfromeremotesource switch to the config file but is it does not seem to work
What Civil3D-version do you have?
I ask because this switch is available starting with Framework 4, but not in earlier releases. So if you have Civil3D 2012 or 2013 then this switch should work (it does not matter if it runs in a virtual environemt or on a workstation itself).
If you have an older Civil3D, then this switch will not be recognized, in that case you have to play with CASPOL to set the policy to trust network-connections.
HTH, - alfred -
Alfred
I am on Civil3d 2012 and using verison 4 of the .net framework. Had I go trying to make it work again last night still no luck.
Hi,
am I right that you first did some dev using Civil3D 2012 64bit and you try now load your dll within a 32bit Civil3D 2012?
Can you show what references you used for your project(s), maybe you have any reference (or any project-setting) that is fixed to 64bit?
You also asked in any of the posts before (in this thread) for Civil3D 2013. So just to make sure: you don't try to load a dll that is designed to work based on 2013 into AutoCAD 2012?
BTW: is the error message you get now when loading your dll the exact same as the first message when I answered with the tip for the acad.exe.config? Or has the message now another meaning?
- alfred -
neilyj (No connection with Autodesk other than using the products in the real world)
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.