Message 1 of 3
LoadOnCommandInvocation Unknown command
Not applicable
12-18-2014
04:29 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi! As I understood it is reccommended to use LoadOnCommandInvocation instead of LoadOnAutoCADStartup. Unfortunatelly I can not get it working. Here are my configuration files:
VB.NET
Imports Autodesk.AutoCAD.ApplicationServices
Imports Autodesk.AutoCAD.DatabaseServices
Imports Autodesk.AutoCAD.EditorInput
Imports Autodesk.AutoCAD.Runtime
Namespace MYNAMESPACE
Public Class MYPUBLICCLASS
Public MyDoc As Document = Application.DocumentManager.MdiActiveDocument
Public MyEd As Editor = MyDoc.Editor
<CommandMethod("MYGROUP", "MYGLOBAL", "MYLOCAL", CommandFlags.Modal)>
Public Sub MYSUB()
MyEd.WriteMessage("running...")
End Sub
End Class
End NamespacePackageContents.xml
<?xml version="1.0" encoding="utf-8"?>
<ApplicationPackage
SchemaVersion="1.0"
AppVersion="1.0.0"
Author="MyAuthor"
Name="MyAppName"
Description="MyDescription"
Icon="./Contents/icon.ico"
HelpFile="./Contents/Help.pdf"
ProductCode="{B6C18088-FEE9-46EF-9A62-10FEA0D388C5}"
UpgradeCode="{A9E27EC5-5EEF-40A2-8156-CD106C89F55B}"
>
<CompanyDetails
Name="MyName"
Email="[email protected]"
/>
<Components>
<RuntimeRequirements
OS="Win64"
Platform="Civil3D"
SeriesMin="R20.0"
SeriesMax="R20.0"
/>
<ComponentEntry AppName="MyAppName" ModuleName="./Contents/c3dx64.dll" LoadOnCommandInvocation = "True" LoadOnRequest="True">
<Commands GroupName="MYGROUP">
<Command Global="MYGLOBAL" Local="MYLOCAL" />
</Commands>
</ComponentEntry>
<ComponentEntry
AppName="MyAppName"
ModuleName="./Contents/c3dx64.cuix"
/>
</Components>
</ApplicationPackage>If I change LoadOnCommandInvocation to LoadOnAutoCADStartup then both MYGLOBAL and MYLOCAL commands are working. The same if I netload .dll manually. No luck with LoadOnCommandInvocation though. Any ideas would be appreciated!
Command: MYGLOBAL Unknown command "MYGLOBAL". Press F1 for help. Command: MYLOCAL Unknown command "MYLOCAL". Press F1 for help. Command: NETLOAD Command: MYGLOBAL running... Command: MYLOCAL running...