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,
Solved! Go to Solution.
Solved by stacy.dunn. Go to Solution.
Is there or will there be a version of SnoopCivil3DTool.dll that can be loaded and used in Civil 3D 2013?
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,
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
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>
I re-downloaded the zip file and extracted it again. Now it works.
Hello Partha,
P.S. my intended purpose is to know more of what I can access in the object model using Visual Lisp GET and PUT functions primarily.
I downloaded the zip and used WinZIP 14.5 as administrator to unzip the file to C:\Program Files\Autodesk\AutoCAD Civil 3D 2013\ (this is a local physical drive and not a member of a RAID). It is important to note that I work without a .NET (pun intended) My .NET skill would not catch a butterfly. I used NETLOAD to attempt to load the dll. This is the result:
Command: netload
Cannot load assembly. Error details: System.IO.FileLoadException: Could not load file or assembly 'file:///C:\Program Files\Autodesk\AutoCAD Civil 3D 2013\SnoopC3DObjects2013x64.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)
File name: 'file:///C:\Program Files\Autodesk\AutoCAD Civil 3D 2013\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 did and I've never seen anything about unblocking regarding zip files. The concept is completely foreign to me. I use a licensed copy of WinZip 14.5 and in this case I started it with "run as administrator".
This is a Windows Vista and Win7 security item, flagging potentially harmful files (in this case, ZIP files containing a DLL) when downloaded from the internet. Why Stacy's Enterprise Edition of Win7 doesn't do this, I'm not sure. But it is quite common for this to cause the error you show. Before opening and extracting the dll from the ZIP, right-click the file in Windows Explorer, select Properties, look at the bottom of the General tab. If it has the Unblock button displayed, press it, then select OK. Now you should be able to safely extract the dll and netload it.
I have never seen anything in my Win7x64 OS that is even remotely like the Zip blocking you've shown. I'm not sure why my system is missing any reference to Zip blocking. Could it be specific to the application that is assigned to your Zip files for "Opens with" (edit, I see you use winzip as well, so propably not)? Could it be that blocking is being applied without any reference or link to "Unblock"? Here is what I see in properties for this Zip file (and all other Zip files are very similar):
P.S. I use a registry hack that allows me to take ownership of any file... so I can easily get past the "You do not have permission" problem so frequently encountered in Win7. It adds the "Take Ownership" option to my right-click menu. (http://www.howtogeek.com/howto/windows-vista/add-take-ownership-to-explorer-right-click-menu-in-vist...) It is possible that prior "Take Ownership" events have made the Blocked issue disappear.
On a hunch I unzipped it again and took ownership of the dll... It loaded without incident.