AutoCAD Civil 3D Customization

Reply
ADN Support Specialist
Partha.Sarkar
Posts: 543
Registered: ‎06-09-2009
Message 1 of 15 (555 Views)
Accepted Solution

Snoop Civil3D 2012 Database Tool

555 Views, 14 Replies
10-23-2011 09:42 PM

Hi,

 

Did you ever look for a Civil 3D Database Snoop utility ? If yes, the following information might be useful to you. Please note, the source code of this utility is also uploaded to Civil 3D Developer ceneter page.

 

Snoop Civil3D 2012 Database  is now Live in Civil 3D Developer Center Page http://usa.autodesk.com/adsk/servlet/index?siteID=123112&id=8007696

 

This tool allows developers inspect the Civil3D Database without writing code. Everything that is shown is accessible through the API, but this tool does not show everything is accessible on the API. It works by showing the root objects of Civil3D 2012 (i.e. Styles, Alignments, Corridors, Assemblies, Subassemblies, Pipe networks and Surfaces) listing them on the left with all objects on each collections, such as all alignments on the active drawing, and once click on each item, list all its properties on right.

 

To use this tool, start AutoCAD Civil 3D 2012, type NETLOAD at the command line and load the 'SnoopCivil3DObjects.dll'. Run snoopCivil3DDB command. Once the DLL is loaded, you can invoke the command from right mouse click 'Snoop Civil3D'.

 

Tool / Utility download link :  SnoopCivil3DTool 

 

Source code of this Utility :  SnoopCivil3DVSProj


Thanks,



Partha Sarkar
Developer Technical Services
Autodesk Developer Network

Mentor
coopdetat
Posts: 196
Registered: ‎03-25-2011
Message 2 of 15 (369 Views)

Re: Snoop Civil3D 2012 Database Tool

12-31-2012 07:05 AM in reply to: Partha.Sarkar

Is there or will there be a version of SnoopCivil3DTool.dll that can be loaded and used in Civil 3D 2013?

---------------------------------------------Signature--------------------------------------------
Civil Design Professional Since 1983 (Intergraph), AutoCAD since 1989
Windows 7 Professional 64-bit - Service Pack 1
Intel﴾R﴿ Core﴾TM﴿ i7-3820 CPU 3.60GHz; 16 GB DDR3 Dual Channel RAM
nVidia Quadro 4000; AutoCAD Civil 3D 2014, sp1
ADN Support Specialist
Partha.Sarkar
Posts: 543
Registered: ‎06-09-2009
Message 3 of 15 (356 Views)

Re: Snoop Civil3D 2012 Database Tool

01-01-2013 10:08 PM in reply to: coopdetat

Hi coopdetat,

 

Source code of Snoop Civil3D 2012 Database Tool is available in the following link and one can compile it as well as enhance it to access more Civil 3D objects.

http://download.autodesk.com/media/adn/SnoopCivil3DVSProj.zip

 

I am attaching here the compiled version for Civil 3D 2013 x64 bit for you. Hope this helps.

 

Wishing you all a very Happy and Prosperous New Year !

 

Thanks,

Partha



Partha Sarkar
Developer Technical Services
Autodesk Developer Network

Valued Mentor
stacy.dunn
Posts: 381
Registered: ‎10-03-2008
Message 4 of 15 (341 Views)

Re: Snoop Civil3D 2012 Database Tool

01-02-2013 11:01 AM in reply to: Partha.Sarkar

Partha,

I tried loading the compiled DLL on a machine that only has 2013 C3D x64 installed.  It is loading from a local drive.

 

I get the following error:

 

Command: netload
Cannot load assembly. Error details: System.IO.FileLoadException: Could not load file or assembly 'file:///C:\Temp\SnoopC3DObjects2013x64.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)
File name: 'file:///C:\Temp\SnoopC3DObjects2013x64.dll' ---> System.NotSupportedException: An attempt was made to load an assembly from a network location which would have caused the assembly to be sandboxed in previous versions of the .NET Framework. This release of the .NET Framework does not enable CAS policy by default, so this load may be dangerous. If this load is not intended to sandbox the assembly, please enable the loadFromRemoteSources switch. See http://go.microsoft.com/fwlink/?LinkId=155569 for more information.
   at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, Boolean suppressSecurityChecks, StackCrawlMark& stackMark)
   at System.Reflection.Assembly.LoadFrom(String assemblyFile)
   at Autodesk.AutoCAD.Runtime.ExtensionLoader.Load(String fileName)
   at loadmgd()

 

 

 

I noticed that the VB project info still references 2012 dll files.  Could this be the problem?

 

Thank you,

Stacy

Stacy Dunn
*Expert Elite*
Jeff_M
Posts: 4,193
Registered: ‎07-22-2003
Message 5 of 15 (338 Views)

Re: Snoop Civil3D 2012 Database Tool

01-02-2013 11:08 AM in reply to: stacy.dunn

Did you Unblock the zip file before extracting the DLL, Stacy?

Jeff_M, also a frequent Swamper
Valued Mentor
stacy.dunn
Posts: 381
Registered: ‎10-03-2008
Message 6 of 15 (333 Views)

Re: Snoop Civil3D 2012 Database Tool

01-02-2013 11:17 AM in reply to: Partha.Sarkar

Jeff,

 

I actually do have that option.  We are running an enterprise version of Windows 7, so it may have been disabled by the IT ninjas.  I have not had to do that in the past and have NETloaded many downloaded files without any problem.

 

Am I correct is my guess that the SnoopCivil3D.vbproj file would control the references in the compiled DLL?

 

 <ItemGroup>
    <Reference Include="acdbmgd">
      <HintPath>C:\Program Files\Autodesk\AutoCAD Civil 3D 2012\acdbmgd.dll</HintPath>
      <Private>False</Private>
    </Reference>
    <Reference Include="Acmgd">
      <HintPath>C:\Program Files\Autodesk\AutoCAD Civil 3D 2012\Acmgd.dll</HintPath>
      <Private>False</Private>
    </Reference>
    <Reference Include="AecBaseMgd">
      <HintPath>C:\Program Files\Autodesk\AutoCAD Civil 3D 2012\AecBaseMgd.dll</HintPath>
      <Private>False</Private>
    </Reference>
    <Reference Include="AeccDbMgd">
      <HintPath>C:\Program Files\Autodesk\AutoCAD Civil 3D 2012\AeccDbMgd.dll</HintPath>
      <Private>False</Private>

Stacy Dunn
*Expert Elite*
Jeff_M
Posts: 4,193
Registered: ‎07-22-2003
Message 7 of 15 (329 Views)

Re: Snoop Civil3D 2012 Database Tool

01-02-2013 11:25 AM in reply to: stacy.dunn

Yes, that's correct, Stacy. However, the link Partha gave is for the 2012 project so it makes sense those are the referenced files. He only posted the compiled for 2013 dll, not the 2013 project :smileyhappy:

Jeff_M, also a frequent Swamper
*Expert Elite*
Jeff_M
Posts: 4,193
Registered: ‎07-22-2003
Message 8 of 15 (327 Views)

Re: Snoop Civil3D 2012 Database Tool

01-02-2013 11:28 AM in reply to: stacy.dunn

So you don't see this on the downloaded zip's properties?

1-2-2013 11-26-44 AM.png

 

I didn't know that could be disabled...

Jeff_M, also a frequent Swamper
Valued Mentor
stacy.dunn
Posts: 381
Registered: ‎10-03-2008
Message 9 of 15 (325 Views)

Re: Snoop Civil3D 2012 Database Tool

01-02-2013 11:32 AM in reply to: Partha.Sarkar

Not on the work computer.

 

Capture.PNG

Stacy Dunn
Valued Mentor
stacy.dunn
Posts: 381
Registered: ‎10-03-2008
Message 10 of 15 (322 Views)

Re: Snoop Civil3D 2012 Database Tool

01-02-2013 11:35 AM in reply to: stacy.dunn

I re-downloaded the zip file and extracted it again.  Now it works.

Stacy Dunn

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community


Civil 3D Exchange Apps

Created by the community for the community, Autodesk Exchange Apps for AutoCAD Civil 3D helps you achieve greater speed, accuracy, and automation from concept to manufacturing.

Connect with Civil 3D

Twitter

Facebook

Blogs