Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

DGN Purge for 2012

21 REPLIES 21
SOLVED
Reply
Message 1 of 22
BlackBox_
8844 Views, 21 Replies

DGN Purge for 2012

I know this isn't exactly a LISP-specific topic, but I know many LISPers who would benefit from this, so I am posting this here as well as in the .NET forum:

 

DGN Purge for 2012

 

 

 

Cheers



"How we think determines what we do, and what we do determines what we get."

21 REPLIES 21
Message 2 of 22
draftorb
in reply to: BlackBox_

Hi there, 

 

It appears you have the solution I have been looking for but....I went the swamp site and cannot find the attachment for the life of me? must i register with the swamp to see the attachment? it also appears registration is down for the time being, so if you could reply it would be much appreciated. 🙂

 

Thank you,

Message 3 of 22
BlackBox_
in reply to: draftorb

As I said in the thread linked above... Kean (and others) did the all the work, I just put it together in a saweet looking package. 

 

Cheers

 

 

 

[Edit] - For some reason, I cannot upload the .ZIP file, so I've appended a .TXT extension... Just remove this, unblock, and unzip, etc..



"How we think determines what we do, and what we do determines what we get."

Message 4 of 22
draftorb
in reply to: BlackBox_

Thanks again, this is very very much appreciated.

 

Thanks again!!!

Message 5 of 22
BlackBox_
in reply to: draftorb


@draftorb wrote:

Thanks again, this is very very much appreciated.

 

Thanks again!!!


Again, you're welcome.

 

Cheers



"How we think determines what we do, and what we do determines what we get."

Message 6 of 22
csevers
in reply to: BlackBox_

I don't see anything in the files when I unzip this.

Chris Severs, PE
Windows 7 Enterprise SP1 64 bit
64.0 GB RAM
Intel Xeon E5-2650 v3 @ 2.30GHz
NVIDA Quadro M4000
Civil 3D 2014
Message 7 of 22
BlackBox_
in reply to: csevers


@csevers wrote:

I don't see anything in the files when I unzip this.


Sorry to hear that; I just downloaded the above *.zip.txt file, unblocked it, changed the file extension to *.zip, unzipped and all files are there.



"How we think determines what we do, and what we do determines what we get."

Message 8 of 22
csevers
in reply to: BlackBox_

I only see a 2010 file, the 2013 folder is empty.

Chris Severs, PE
Windows 7 Enterprise SP1 64 bit
64.0 GB RAM
Intel Xeon E5-2650 v3 @ 2.30GHz
NVIDA Quadro M4000
Civil 3D 2014
Message 9 of 22
csevers
in reply to: BlackBox_

I have found the .dlls from another source, but I cannot get them to load. When I run netload I get this:

Cannot load assembly. Error details: System.IO.FileLoadException: Could not load file or assembly 'file:///C:\Users\christopher_severs\Desktop\px64\DgnLsPurge.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)
File name: 'file:///C:\Users\christopher_severs\Desktop\px64\DgnLsPurge.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()

 

 

Chris Severs, PE
Windows 7 Enterprise SP1 64 bit
64.0 GB RAM
Intel Xeon E5-2650 v3 @ 2.30GHz
NVIDA Quadro M4000
Civil 3D 2014
Message 10 of 22
_gile
in reply to: csevers

did you unblock the zip file and/or the dll ?

Right click > Properties > Unblock (at the bottom of the dialog).



Gilles Chanteau
Programmation AutoCAD LISP/.NET
GileCAD
GitHub

Message 11 of 22
BlackBox_
in reply to: csevers


@csevers wrote:

I have found the .dlls from another source, but I cannot get them to load. When I run netload I get this:

Cannot load assembly. Error details: System.IO.FileLoadException: Could not load file or assembly 'file:///C:\Users\christopher_severs\Desktop\px64\DgnLsPurge.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)
File name: 'file:///C:\Users\christopher_severs\Desktop\px64\DgnLsPurge.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()

 

 


More information is needed in order to help you.

 

You list multiple versions of AutoCAD-based products, but the Autoloader .bundle attached above is specifically for 2012 only. 

 

You do not load the assembly from your ..\Desktop\px64\ folder, you place the extracted .bundle folder here:

 

%AppData%\Autodesk\ApplicationPlugins\

 

 

The purpose of the Autoloader mechanism is to automatically load the appropriate plug-in for the applicable version without the user doing anything.

 

The nested assembly can be NETLOADed into 2010-2011 as well, however, you'd have to (potentially) configure Acad.Exe.Config appropriately to enable LoadFromRemoteSources if said assembly was located on the network, and further you'd have to configure your load mechanism for said assembly (i.e., Registry loader, Acad.lsp, etc.).



"How we think determines what we do, and what we do determines what we get."

Message 12 of 22
csevers
in reply to: BlackBox_

I'm trying to load either of these app (see below), which are the same as the app in this forum.

 

http://images.autodesk.com/adsk/files/AutoCAD_2013-2014_DGN_Hotfix_Readme.pdf

 

https://apps.exchange.autodesk.com/CIV3D/en/Detail/Index?id=appstore.exchange.autodesk.com%3Adrawing...

 

 

Chris Severs, PE
Windows 7 Enterprise SP1 64 bit
64.0 GB RAM
Intel Xeon E5-2650 v3 @ 2.30GHz
NVIDA Quadro M4000
Civil 3D 2014
Message 13 of 22
BlackBox_
in reply to: csevers


@csevers wrote:

I'm trying to load either of these app (see below), which are the same as the app in this forum.

 

http://images.autodesk.com/adsk/files/AutoCAD_2013-2014_DGN_Hotfix_Readme.pdf

 

https://apps.exchange.autodesk.com/CIV3D/en/Detail/Index?id=appstore.exchange.autodesk.com%3Adrawing...

 

 


By definition, these are not the same app, and you still haven't answered the request(s) for additional information... Until then, I cannot help you.

 

Cheers



"How we think determines what we do, and what we do determines what we get."

Message 14 of 22
csevers
in reply to: BlackBox_

I'm using Civil3d 2013 SP2. 

 

And they're the same apps, just for different versions, if I'm not mistaken. Let's not debate semantics...

 

As for autoload vs netload, I have no idea what either of those are. I'm just trying to fix my drawing.

Chris Severs, PE
Windows 7 Enterprise SP1 64 bit
64.0 GB RAM
Intel Xeon E5-2650 v3 @ 2.30GHz
NVIDA Quadro M4000
Civil 3D 2014
Message 15 of 22
BlackBox_
in reply to: csevers


@csevers wrote:

I'm using Civil3d 2013 SP2. 

 

And they're the same apps, just for different versions, if I'm not mistaken. Let's not debate semantics...

 

As for autoload vs netload, I have no idea what either of those are. I'm just trying to fix my drawing.


Thank you, csevers.

 

There is nothing to debate; you are mistaken, and that's okay... I get that you're just trying to fix your drawing, and that this is not familiar to you.

 

In a continued effort to try and help, NETLOAD is a Command used to manually load a .NET assembly (a .DLL), and can be used with LISP, etc. so you don't actually have to manually type out the command at session start.

 

The Autoloader mechanism is available for 2012 and newer versions (see the link in my signature for more info), and automagically loads the appropriate components into the correct version (i.e., 2012, 2013, etc.) as these often require different components, depending on what type of components we're talking about.

 

If you download your app from Autodesk Exchange (choose the one you like best), there is an installer that will place your newly purchased/downloaded app into the following directory (as noted above):

 

%AppData%\Autodesk\ApplicationPlugins\

 

 

You do not need to manually do anything for an app's .bundle (once placed in this location, either by installer, or manually) to load into 2012 or newer version. Nothing. Just open your AutoCAD product. That's it.

 

I really do hope this helps you.

 

Cheers



"How we think determines what we do, and what we do determines what we get."

Message 16 of 22
csevers
in reply to: BlackBox_

I guess you will debate it, whatever, I'm done with it.

Anyway, my problem was that you need admin rights on the machine to load, as well as run, the dgn purge command, which the readme does not specify.

 

dgnpurge did not solve my issue anyway, but thanks to everyone for the suggestions.

Chris Severs, PE
Windows 7 Enterprise SP1 64 bit
64.0 GB RAM
Intel Xeon E5-2650 v3 @ 2.30GHz
NVIDA Quadro M4000
Civil 3D 2014
Message 17 of 22
BlackBox_
in reply to: csevers


@csevers wrote:

 

... my problem was that you need admin rights on the machine to load, as well as run, the dgn purge command, which the readme does not specify.

 

dgnpurge did not solve my issue anyway, but thanks to everyone for the suggestions.


I have never experienced this before, and I was not previously local Admin when I first used this utility - must be something specific to your environment, or user policy.

 

One need not be a local Admin in order to NETLOAD this assembly (regardless of Autoloader; which automagically implements a Registry loader for .NET assemblies). One need only write access to either local disk where the assembly is manually NETLOADED from (LoadFromRemoteSources="true" something different altogether), or the local path noted above for Autoloader to work.

 

While one cannot invoke a Command that has not been implemented by a .NET assembly, if one can NETLOAD said assembly, then the Command can be called at anytime... It either loads, or it doesn't, AFAIK.

 

You didn't specify how the assembly was loaded (manually, or Autoloader), but it may be possible that your group policy precludes the Autoloader mechanism to write the necessary Registry loader keys... That would just prevent the assembly from being loaded at all, hence no worky.

 

In any event, sorry to hear that you couldn't successfully use a good utility.

 

Cheers



"How we think determines what we do, and what we do determines what we get."

Message 18 of 22
csevers
in reply to: BlackBox_

Thanks. 

 

You are probably right about admin rights, I just know I can't modify any system files so that causes problems sometimes.

 

I can run dgnpurge, it just does not run correctly in the drawing I am have problems with, in other drawings it works fine. The one time I had IT run it, I did not recieve the same error as attached. Either way, I still cannot use the copyclip command in that drawing without crashing CAD, which is the real issue I am trying to tackle. 

 

I included the full detail in the attached .txt file because I could not maximize the error window.

 

Thanks for all the help. I know I can be snippy on here. I've got a dealine next Friday and I can't copy my simple linework to send to the client for a project I've been working on for the past two years. My surfaces, profiles, alignments, etc. all fine, I just can't copyclip linework out of the drawing without it crashing. And its only the one drawing, my basemap. I have a separate thread here: 

 

http://forums.autodesk.com/t5/AutoCAD-Civil-3D-General/COPYCLIP-and-CUTCLIP-Crash-drawing/m-p/488161...

 

 

Chris Severs, PE
Windows 7 Enterprise SP1 64 bit
64.0 GB RAM
Intel Xeon E5-2650 v3 @ 2.30GHz
NVIDA Quadro M4000
Civil 3D 2014
Message 19 of 22
BlackBox_
in reply to: csevers


@csevers wrote:

Thanks. 

 

You are probably right about admin rights, I just know I can't modify any system files so that causes problems sometimes.

 

I can run dgnpurge, it just does not run correctly in the drawing I am have problems with, in other drawings it works fine. The one time I had IT run it, I did not recieve the same error as attached. Either way, I still cannot use the copyclip command in that drawing without crashing CAD, which is the real issue I am trying to tackle. 

 

I included the full detail in the attached .txt file because I could not maximize the error window.

 

Thanks for all the help. I know I can be snippy on here. I've got a dealine next Friday and I can't copy my simple linework to send to the client for a project I've been working on for the past two years. My surfaces, profiles, alignments, etc. all fine, I just can't copyclip linework out of the drawing without it crashing. And its only the one drawing, my basemap. I have a separate thread here: 

 

http://forums.autodesk.com/t5/AutoCAD-Civil-3D-General/COPYCLIP-and-CUTCLIP-Crash-drawing/m-p/488161...

 

 


 

You're welcome, csevers; I'm happy to help. :beer:

 

FWIW - When it comes to AutoCAD-based product deployments, I ensure users have write access to all local folders affected, and they have write access to entire HKCU hive, AFAIK. While each working environment, and IT policy is different, this *should* be sufficient to meet both IT policy, and user ability to be productive (and innovative as applicable).

 

I too work with Civil 3D daily... As a last resort type of workaround, you might consider exporting all of your AEC* objects to LandXML, and use AECEXPORTTOAUTOCAD Command to 'dumb down' all linework, blocks, etc. then WBLOCK out your linework, whcih will result in a drawing that contains any of the applied line, text-styles, etc. From there, you LandXML in your AEC Objects and reassociate to your project. Obviously, any ObjectData, or XData, and applied styles will come with your WBLOCK drawing.

 

Note - This last resort presumes that the other apps you mentioned previously are also unsuccessful.

 

As for being snippy, don't worry about it... I've yet to meet someone who hasn't been at one point or another (including myself). We're all here to learn, to teach, or a little of both.

 

Again, really sorry you're experiencing such trouble. If, or when you get it fixed, please be sure to post your findings (i.e., what really caused the issue, and what solved it) so as to help others down the road?

 

Cheers



"How we think determines what we do, and what we do determines what we get."

Message 20 of 22
BlackBox_
in reply to: BlackBox_

Also, not sure which DgnPurge assembly you've previously downloaded (since the one attached to this thread is for 2012 only), but here's the source code I used to compile that assembly, you might want to compile for 2013 yourself, as I did so for 2014 and all works well here.



"How we think determines what we do, and what we do determines what we get."

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost