DesignCAD 3D Max 2027 box
Now available

DesignCAD 2027

Hatches that follow their boundaries, an on-screen dial to turn your model, and a way to find any command by name, in a clean Windows 11 look.

Referencing DesignCAD with Visual Studio 2010

Started by tadlags, July 27, 2011, 05:30:08 AM

Previous topic - Next topic

0 Members and 0 Guests are viewing this topic.

tadlags

I'm a .NET developer that is just getting started with DesignCAD 21. I need to reference it in my C# project. I can't seem to get started.  Is there doucmentation to guide me. What dll should I be hitting?

DrollTroll

you don't reference a dll, you reference the type library. It should already be listed in the COM tab of your "add reference" dialog; if not browse to the designcad folder and add the tlb file.

There's not much documentation on using C# in DesignCAD yet; up until version 21, it was quite difficult to start a new instance of DesignCAD via .NET, but that's been fixed. Mostly you're stuck with the OLE Automation docs and browsing the object.

If you run into other snags, we'll try to help.
25 years with DesignCAD

tadlags

Thanks ... I'm able to find the type library but I can't reference it because I am having trouble registering it. Could that be because I am still using a trial. If not, any other ideas?

DrollTroll

It should automatically be registered when you run DesignCAD.

If you're not using an Administrator account, try running DesignCAD "As Administrator" or log into an Admin account and run "as Administrator" -- that should register the type library. Or open a command window with Administrator privileges, browse to the DesignCAD folder, and run rgsvr32 on the tlb file.

I have often also found with .NET apps that I have to run both Visual Studio AND the application at the same level -- either both "As Administrator" or both not.
25 years with DesignCAD

tadlags

Thanks! Running DesignCAD as Administrator and Visual Studio As Administrator did the trick. I'm off and running ...