.NET

.NET

Reply
Contributor
17 Posts
0 Kudos
Registered: ‎09-19-2013
Post 1 of 6

Dangerous Dll - Message & Polyline thickness parameter

214 Views, 5 Replies
09-20-2013 01:58 AM

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.

Contributor
25 Posts
7 Kudos
Registered: ‎09-28-2004
Post 2 of 6

Re: Dangerous Dll - Message & Polyline thickness parameter

09-20-2013 02:31 AM 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:smileywink:

 

Tab: Dateien

There: Vertrauenswürdige Speicherorte

 

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

Contributor
25 Posts
7 Kudos
Registered: ‎09-28-2004
Post 3 of 6

Re: Dangerous Dll - Message & Polyline thickness parameter

09-20-2013 02:37 AM in reply to: NikWach

Oh... there is a second question :smileyhappy:

 

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

 

Contributor
17 Posts
0 Kudos
Registered: ‎09-19-2013
Post 4 of 6

Re: Dangerous Dll - Message & Polyline thickness parameter

09-20-2013 02:45 AM in reply to: Matti72

It worked, I just should have set the LWDisplay to 1, than I could see it:smileytongue:

Contributor
17 Posts
0 Kudos
Registered: ‎09-19-2013
Post 5 of 6

Re: Dangerous Dll - Message & Polyline thickness parameter

09-20-2013 02:54 AM 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?

Contributor
25 Posts
7 Kudos
Registered: ‎09-28-2004
Post 6 of 6

Re: Dangerous Dll - Message & Polyline thickness parameter

09-20-2013 03:07 AM 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.

 

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post