I have a .net program that I would like to run using an icon. I've done this before and it worked, but now it's giving me an error.
I created the icon and command, I added the following to the command line:
^C^Cnetload "C://Program Files//my stuff//myProgram.dll” adp
(adp will lanch the program)
I get the following:
netload Assembly file name: "C://Program
Files//mystuff//myProgram.dll” adp
Cannot load assembly. Error details: System.ArgumentException: Illegal
characters in path.
at System.IO.Path.CheckInvalidPathChars(String path)
at System.IO.Path.Combine(String path1, String path2)
at ?A0xe1e1f031.NormalizeLoadFilename(String fname)
at Autodesk.AutoCAD.Runtime.ExtensionLoader.Load(String fileName)
at loadmgd()
Originally I tried using single slashes (/), but it still gives the same error. It seems to have trouble with the spaces in the file path. How do I work around that?
The file path in your macro is wrong: you use either double back-slash "\\" or single forward-slash "/". Yet, you used double forward-slash "//", hence the "illegal character in path"!
Norman Yuan
When I use:
^C^Cnetload "C:\\Program Files\\my Stuff\\myProgram.dll” adp
I get:
Command: netload Assembly file name: "C:
Cannot load assembly. Error details: System.ArgumentException: Illegal
characters in path.
at System.IO.Path.CheckInvalidPathChars(String path)
at System.IO.Path.Combine(String path1, String path2)
at ?A0xe1e1f031.NormalizeLoadFilename(String fname)
at Autodesk.AutoCAD.Runtime.ExtensionLoader.Load(String fileName)
at loadmgd()
When I use:
^C^Cnetload "C:/Program Files/my Stuff/myProgram.dll” adp
I get:
Command: netload Assembly file name: "C:/Program Files/my
Stuff/myProgram.dll” adp
Cannot load assembly. Error details: System.ArgumentException: Illegal
characters in path.
at System.IO.Path.CheckInvalidPathChars(String path)
at System.IO.Path.Combine(String path1, String path2)
at ?A0xe1e1f031.NormalizeLoadFilename(String fname)
at Autodesk.AutoCAD.Runtime.ExtensionLoader.Load(String fileName)
at loadmgd()
It's so weird, it used to work with the single slashes.
Ok, I just retyped the command very carefully:
^C^Cnetload "C:/Program Files/my Stuff/myProgram.dll" adp
For some reason, this one works. Maybe a hidden character from a cut and paste?
I'm using for years lisp expression for button macro,
i.e. for full path of my test .dll:
^C^C(command "_.NETLOAD" "C:/Users/Oleg/Programming/ACAD/ACAD_START/AutoCAD CSharp plug-in1/AutoCAD CSharp plug-in1/bin/Release/AutoCAD CSharp plug-in1.dll" )(princ)
It should working for me with no problem,
as you can see your friend is a single slash as delimiter
The " character at the end of the string looks different than the one at the beginning I bet that is your illicit character causing the problem.
Can't find what you're looking for? Ask the community or share your knowledge.