.NET

.NET

Reply
Contributor
NikWach
Posts: 17
Registered: ‎09-19-2013
Message 1 of 6 (213 Views)

Dangerous Dll - Message & Polyline thickness parameter

213 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
Matti72
Posts: 25
Registered: ‎09-28-2004
Message 2 of 6 (206 Views)

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
Matti72
Posts: 25
Registered: ‎09-28-2004
Message 3 of 6 (203 Views)

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
NikWach
Posts: 17
Registered: ‎09-19-2013
Message 4 of 6 (199 Views)

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
NikWach
Posts: 17
Registered: ‎09-19-2013
Message 5 of 6 (191 Views)

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
Matti72
Posts: 25
Registered: ‎09-28-2004
Message 6 of 6 (187 Views)

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
Announcements
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.