Is there a proper way to setup Civil 3D for the purpose of Developing Add-Ons?

Is there a proper way to setup Civil 3D for the purpose of Developing Add-Ons?

john9XGED
Contributor Contributor
1,294 Views
10 Replies
Message 1 of 11

Is there a proper way to setup Civil 3D for the purpose of Developing Add-Ons?

john9XGED
Contributor
Contributor

I am starting the process of learning .NET Add-on development for Civil 3D, but I also still use Civil 3D as an Engineer, daily. What is the best practice for setting up an isolated instance of Civil 3D for development purposes so that I do not interfere with my daily use C3D?

0 Likes
Accepted solutions (1)
1,295 Views
10 Replies
Replies (10)
Message 2 of 11

Jeff_M
Consultant
Consultant
Accepted solution

@john9XGED I personally just use my production C3D environment. I setup my Debug config to compile into a bundle so it autoloads when C3D starts. It's also easy to have it not load by renaming the PackageContents.xml file in the bundle if needed. I've been doing my 'day job' and 'side job' like this for about 13 years now (mostly, since the *bundle option wasn't available until Acad 2013). Long ago I tried having 2 computers to separate 'work' from 'programming'  but that lasted less than 6 months.

Jeff_M, also a frequent Swamper
EESignature
Message 3 of 11

Ed__Jobe
Mentor
Mentor

Hi @john9XGED I agree with @Jeff_M . Mostly, I work on the same instance I do my work with. Although, I do have a virtual pc that I sometimes work with. Mostly I do that when I want to develop for the next version we'll be upgrading to. This is because I have admin rights on the vm, but not on my daily use pc. If you don't have a vm, you can use remote desktop (*.rdp) to connect to a local pc. But for just starting out, you shouldn't need anything more than your regular setup.

Ed


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.
How to post your code.

EESignature

Message 4 of 11

john9XGED
Contributor
Contributor

Thanks @Jeff_M! As a new C3D developer, this sounds like a good idea "I setup my Debug config to compile into a bundle so it autoloads when C3D starts". Can you point me to any resources that break this down? 

0 Likes
Message 5 of 11

Ed__Jobe
Mentor
Mentor

In addition to Jeff's debug setup, you need to create a bundle. It is described here.

 

There are a couple of other easy methods you can choose from. The one I utilize is using a mnl file with my partial cuix. I already had a bunch of toolbars and palette panels. So I just include code like the following. When I want to debug, I just comment out the normal line and uncomment the debug version.

;;; *********************
;;; load NET assemblies used by engr.mnu
;;; *********************
(command-s "Netload" "C:\\AcadCustom\\Support_GS\\AutoCAD 2023 TID.dll")
;; (command-s "Netload" "N:\\Personal\\Elj\\Visual Studio\\Projects\\AutoCAD 2023 TID\\bin\\Debug\\AutoCAD 2023 TID.dll")

 

The other method you can use that is good for testing without any other setup is described in the file in the first post of this thread.

 

Ed


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.
How to post your code.

EESignature

Message 6 of 11

Jeff_M
Consultant
Consultant

@john9XGED here is a link to the official whitepaper for the autoloader: https://adndevblog.typepad.com/autocad/2013/01/autodesk-autoloader-white-paper.html

I'm attaching one of my PackageContents.xml files which works well. Many new users of the bundle method have issues setting this up so hopefully this will help with that. I have the C3D 2023 Debug solution config set to build here: C:\ProgramData\Autodesk\ApplicationPlugins\C3DUtilities.bundle\Contents\R24.2\

 

Good luck and have fun!

Jeff_M, also a frequent Swamper
EESignature
Message 7 of 11

john9XGED
Contributor
Contributor
Thanks this will be really helpful!
0 Likes
Message 8 of 11

john9XGED
Contributor
Contributor
I appreciate the links! I'm going to give them a read.
0 Likes
Message 9 of 11

Ed__Jobe
Mentor
Mentor

You change the Build path in the VS project Properties dialog. By default it builds to the bin folder. Just change the path to your bundle location.

VS.png

Ed


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.
How to post your code.

EESignature

0 Likes
Message 10 of 11

john9XGED
Contributor
Contributor
Does the output path remain the same for each project or change, accordingly?
0 Likes
Message 11 of 11

Jeff_M
Consultant
Consultant

When you start a new project it will default to bin\Debug\

Jeff_M, also a frequent Swamper
EESignature