Autoloader

Autoloader

a.kouchakzadeh
Advocate Advocate
544 Views
2 Replies
Message 1 of 3

Autoloader

a.kouchakzadeh
Advocate
Advocate

Hi

I have a question regarding autoloader. 

When I'm using the appdata/roaming/autodesk/... directoey and create an xxx.bundle file, why would Autocad ask for permission to net load on first startup?

What if you have 10 dll files? Then user has to press click yes for 10 times? 

Isn't this path suppose to be a trusted path? 

Is there any silent way to net load the dlls? 

Also dose "load on Autocad startup" decrease Autocad startup speed? Fenton webb suggested to use load on command invoke (I think in the white paper but it might be in the related video) but I couldn't get it done. 

Also another question is, if I'm gonna update my plugin, how should I use the update guid code? 

0 Likes
Accepted solutions (1)
545 Views
2 Replies
Replies (2)
Message 2 of 3

norman.yuan
Mentor
Mentor
Accepted solution

Only "C:\program files\Autodesk\" folder is considered trusted location. If you load executable (LISP/VBA/DLL/ARX/DBX/CRX...) from anywhere else, you need to deal with "SecureLoad" system variable for different options:

0 - no secure, can load from anywhere, just as old days of AutoCAD;

1 - load from trusted location is OK, if not, AutoCAD display warning, as you saw. This is default value;

2. - only allows to load from trusted location.

 

Option"0" is obviously not recommended. You can of course to deploy your app in "C:\Program files\Autodesk.ApplicationPlugins\" without having to bother "SecureLoad" variable, but the deployment (copying) to that folder requires "local admin" privilege. If you choose to use "...appdata\roaming\...", like many do, simply add that path, or whatever path you choose, to the trusted location in the "Options" dialog, and save the particular user profile as office standard user profile.

 

A tip: when adding a trust location, you may want to make sure all subfolder of that location are also treated as trusted. So, instead a folder path

 

C:\MyCadApps\NetPlugins

 

You can do

 

C:\MyCadApps\NetPlugins\...

 

As for decreasing AutoCAD startup speed, it will depend on if the plugin implements IExtenstionApplication interface and what is done in its Initialize(). 

 

Norman Yuan

Drive CAD With Code

EESignature

0 Likes
Message 3 of 3

a.kouchakzadeh
Advocate
Advocate

Thank you Mr. Yuan
could you please tell me how to use the update GUID code?

If im gonna send user an updated version of my apps, where do I have to refer to this code?

what about the product GUID in the ApplicationPackage tag?

does that change in each update I send the user?

 

<?xml version="1.0" encoding="utf-8"?>
<ApplicationPackage 
	AppVersion="1.0.0" 
	Author="author" 
	Description="package description" 
	HelpFile="./contents/hlepfile.html" 
	Icon="./Contents/Resources/icon.ico" 
	Name="my app names" 
	ProductCode="should this code always be unique?" 
	ProductType="Application" 
	SchemaVersion="1.0" 
	UpgradeCode="what does this code do?" 
	AutodeskProduct="AutoCAD" 
	FriendlyVersion=" " 
	SupportedLocales="Enu"  
	OnlineDocumentation="www.website.com">
  <CompanyDetails Name="my company" Phone="my phone " Url="my site" Email="my email" />
  <Components 
	  Description="CUI file">
    <RuntimeRequirements 
		SupportPath="./Contents/Resource" 
		OS="Wins32|Win64" 
		Platform="AutoCAD" 
		SeriesMin="R22.0" 
		SeriesMax="R24.3" />
    <ComponentEntry 
		AppDescription="Insertes tabs on the ribbon" 
		AppName="my cui file" 
		ModuleName="./Contents/Resource/mycui.cuix" 
		Version="1.0.0">
	</ComponentEntry>
  </Components>
	
  <Components 
	  Description="my first app">
    <RuntimeRequirements 
		OS="Win32|Win64" 
		Platform="AutoCAD" 
		SeriesMin="R22.0" 
		SeriesMax="R24.2" />
    <ComponentEntry 
		AppDescription="my app description" 
		AppName="MyFirstApp" 
		LoadOnAutoCADStartup="true" 
		ModuleName="./Contents/Support/MyFirstApp.dll" 
		Version="1.0.0" />
  </Components>
  <Components
	  Description="my second app">
    <RuntimeRequirements 
		OS="Win32|Win64" 
		Platform="AutoCAD" 
		SeriesMin="R22.0" 
		SeriesMax="R24.2" />
    <ComponentEntry 
		AppDescription="second app description" 
		AppName="MySecondApp" 
		LoadOnAutoCADStartup="true" 
		ModuleName="./Contents/Support/MyFirstApp.dll" 
		Version="1.0.0" />
  </Components>
</ApplicationPackage>
0 Likes