.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Dangerous Dll - Message & Polyline thickness parameter

5 REPLIES 5
Reply
Message 1 of 6
NikWach
464 Views, 5 Replies

Dangerous Dll - Message & Polyline thickness parameter

Hi everyone,

 

Ich have got the following problems.

 

While loading the dll extension into AutoCAD (command netload), Autocad shows me a message, that the loading of those dll from that folder can be dangerous. How can I change in my source code, that a dll will authomatically recognized as non-dangerous?

 

Another case is, that I got a lot of thickness properties in my text-source, I want to attach them to the newly created polylines, with something like

 

acPoly.Thickness = Polylinie_Collection(i).BREITE

 

but after I open the created drawing, the polylines still have got the same thickness. Before this command I attach a colour property to the polylines and it does work. With the thickness is a large problem. I tried to set a thickness parameter to a large property, but it still didn't show it correctly.

5 REPLIES 5
Message 2 of 6
Matti72
in reply to: NikWach

You get the dangerous Dll Message, if you load a dll from a place, which is not "safe"

 

You can configure those places

 

konfig

 

(I believe you have a german AutoCAD so it is;)

 

Tab: Dateien

There: Vertrauenswürdige Speicherorte

 

Add there the Directory, where your .dll is located and the message will go away 🙂

Message 3 of 6
Matti72
in reply to: NikWach

Oh... there is a second question 🙂

 

Try to set the ConstantWidth property instead of the Thickness property. That should do, what you want.

 

Message 4 of 6
NikWach
in reply to: Matti72

It worked, I just should have set the LWDisplay to 1, than I could see itSmiley Tongue

Message 5 of 6
NikWach
in reply to: NikWach

Thanks for the tip, but I need to set the trusted path folder with the code - while running the application, the source folder of this application should be trusted. Is it possible with the use of .net?

Message 6 of 6
Matti72
in reply to: NikWach

The problem is, that in order to do something with your code, the code must be loaded. So if the trusted paht is not changed you get the dangerous .dll message before you can do anything with your code.

 

But maybe this could help you (regarding if you install your product or do something before autocad is started...)

 

The trusted paht is saved in the registry:

HKEY_CURRENT_USER\Software\Autodesk\AuitoCAD\R.19.1\ACAD-D001:407\Profiles\<<Unbenanntes Profil>>\Variables -> TRUSTEDPATHS

 

This is the place you can adjust during insatallation to add your folder to the trustedpaths.

 

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

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost