Can anyone give me any clue how to get the code in this blog post to run in Civil 3D??
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.
The example is C# (C Sharp) programming code that must be compiled into a dynamic link library (dll) that can be netloaded into Civil3D (or any ACad based program).
You would need at the minimum Microsoft Visual Studio Express get started with this example.
Thanks Mike - that's what I suspected, hopefully a .NET guru will grasp this and oblige.........
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.
Neil,
I figured since this is posted code I could go ahead and compile it for you (no support though!).
Should run on 2010 and later (But I only have 2012 installed so I can't test on other versions).
To use it you'll need to run the netload command and pick the attached dll file.
Then on the command line enter the command: AIOBJECTSCALEREMOVEOTHERS
Hope it works but is provided as is.
Mike
Thanks for this (I downloaded the Express C# studio from Microsoft just for a look and was totally lost...!!!) - I'll check it out tomorrow
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.
I am new to C#. When I tried to paste the original code into visual c# express and then compile, it did not seem to work after netload. How much "fidling" does one have to do to use code like this?
I recommend you copy this thread to the Civil 3D Customization group. That's where the programmers hang out...
What type of project did you create to paste your code into? Should be a C# Class library,
Is your project compiling?
Not familiar with the Express version of Visual Studio but in your Project Properties, on the BUild Tab the "Platform Target" must either be set to "Any CPU" or match the bit version of Civil3D you are running the app in (either 32 or 64bit).
Did you download the ObjectARX SDK also? You'll need this so you can create the correct references in your project.
Do you get an error when you netload or when you try to run the command?
I pasted the code into c# express 2008 with the Autocad wizards loaded.
I started a new project with the Autocad wizard, then attempted to paste it in. I was confused as to where to insert the code in the project, and just deleted all, then pasted over. This compiled and I netloaded the dll, but autocad would not recognize the command.
I then started a "create library" project in c# express and then pasted in the code. After referencing the autocad dlls the code then compiled correctly and ran in autocad! Problem solved............sort of. I still do not know how to use the Autocad Wizard project, to make use of the same code.
I am going to view all the devTV vids to see if I can learn more.
Thank you for your reply.
Like another poster said you'll do better posting these types of Questions in the Customization forum especially since you are dealing with plain AutoCAD programming right now. If you get to specific C3D programming questions later you might post those here.
I've actually found that when I was getting started the wizard actually made the whole thing look more confusing than it need to be, the project created by the wizard had a lot of stuff you may never use. I've been doing C3D programming now for about 5 years and still don't use the wizard.
Hi All,
I'm running (R) 2014 and just tried this. Wondering if you've had any luck running this in (R) 2014?
Thanks,
Hi Paul,
From the age of the posts, it looks like it was compiled before AutoCAD 2013, which had an API change, so I doubt it will NETLOAD. (I didn't try it).
The code is probably still good, but if you wanted to compile your own DLL, you'd need 3 Autodesk References in the C# project, not 2 as before 2013.
accoremgd.dll
acdgmgd.dll
acmgd.dll
They come with AutoCAD.
HTH,
Mike