Jump to content

Recommended Posts

Posted

I've created a dll, with a few commands, in Visual Studio. It all works great on my PC, but when I Netload it on another PC, it doesn't recognize my commands.

It does not give error messages at any time. It just doesn't work (as if I didn't load it).

 

Can anyone help please?

Posted

More information is needed.

 

What versions of AutoCAD?

 

What environment (OS, x86, x64)?

 

What .NET Framework are you targeting?

 

Any COM (Interop) Assembly References?

 

You did set your non-Framework Assembly References to Copy Local == False, right?

 

Where are you NETLOADing from (local disk, or network)?

 

If the latter, and pre-.NET 4, did you remember to enable LoadFromRemoteSources XmlAttribute in Acad.exe.config?

 

... Etc.

 

 

 

Cheers

Posted

Just to add... It's possible your code is at fault (albeit unknowingly).

 

As one example, if your Initialize() call throws an exception, the rest of your code is disregarded... Have you stepped through your code at debug?

 

Cheers

Posted

Hello BlackBox,

 

Thank you so much for the reply.

I am using Civil 3d 2015. The other PC has Civil 3D 2014.

Both are x64 Windows 7

I'm targeting .NET Framework 4.5

I'm NETLOADing from the local disk.

 

I've stepped through code at debugging, and everything seems fine.

 

I'm not sure if this is relevant, but in the immediate window I get many errors like this one:

 

System.Windows.Data Error: 5 : Value produced by BindingExpression is not valid for target property....

Posted

Capture.jpg

This is what my references look like.

I tried targeting .NET Framework 4.0, but that give hundreds of errors when I try to build.

Posted

I don't have access to Civil 3d so I'll refrain from too much input, but to clarify:

 

 

A separate compiled version, targeting Framework 4.0 and the appropriate ManagedARX DLLs, may be required for 2014.

Civil 3d 2015 may need Framework 4.5 (or newer) for development.

Posted

I think I solved it:

I changed Target CPU on the Compile tab to x64. Now it runs on both 2014 and 2015

Thanx to BlackBox and SEANT for your efforts. It is much appreciated.

Posted

FWIW -

 

You *should* be able to compile using 'Any CPU' unless you can platform-dependent COM references.

 

While technically 2014 is .NET 4.0, and 2015 is .NET 4.5, assemblies compiled to .NET 4.0 will load in newer versions, so long as the APIs used are still available (hooray backwards compatibility!).

 

Also, as I am usually in AutoCAD, Civil 3D, etc. when developing, I use this as a quick .NET Framework compatibility reference:

 

(vl-load-com)

(defun c:NETVER ()
 ((lambda (vrsn)
    (prompt
      (cond
        ((vl-string-search "16.2" vrsn) "\n.NET Framework 1.1")        ; 2006
        ((vl-string-search "17.0" vrsn) "\n.NET Framework 2.0")        ; 2007
        ((vl-string-search "17.1" vrsn) "\n.NET Framework 2.0")        ; 2008
        ((vl-string-search "17.2" vrsn) "\n.NET Framework 3.0")        ; 2009
        ((vl-string-search "18.0" vrsn) "\n.NET Framework 3.5")        ; 2010
        ((vl-string-search "18.1" vrsn) "\n.NET Framework 3.5")        ; 2011
        ((vl-string-search "18.2" vrsn) "\n.NET Framework 4.0")        ; 2012
        ((vl-string-search "19.0" vrsn) "\n.NET Framework 4.0")        ; 2013
        ((vl-string-search "19.1" vrsn) "\n.NET Framework 4.0")        ; 2014
        ((vl-string-search "20.0" vrsn) "\n.NET Framework 4.5")        ; 2015
        ; <-- 2016
        (("\n** Unown version of AutoCAD ** "))
      )
    )
  )
   (if vlax-user-product-key                                           ; If 2013+
     (vlax-user-product-key)                                           ; Use new function
     (vlax-product-key)                                                ; Use legacy function
   )
 )
 (princ)
)

 

 

 

Cheers

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...