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

Creating a Command for AutoCAD 2010

6 REPLIES 6
Reply
Message 1 of 7
Anonymous
1208 Views, 6 Replies

Creating a Command for AutoCAD 2010

I am using demand-loading for this program, but AutoCAD seems to load the files properly. It does not, however recognize the command. When I type in the command, AutoCAD loads the file, but says: "Unknown command "LOADPOST". Press F1 for help." This is the correct command name, defined in the dll that is loaded into AutoCAD prior to the message. I also loaded the dll manually and got the same message. I have no problems in AutoCAD 2007. Here is the main class of the dll:

{code}
Public Class vbstudentClass
Dim PostWindow As New Posting

CommandMethod("LoadPost") _
Public Sub LoadPost()
Autodesk.AutoCAD.ApplicationServices.Application.ShowModalDialog(PostWindow)
End Sub

End Class
{code}

CommandMethod("LoadPost") is encapsulated by less than and greater than signs, but they won't show up here Edited by: vampirefromtheitcave2 on Apr 5, 2010 4:20 PM
6 REPLIES 6
Message 2 of 7
Anonymous
in reply to: Anonymous

I have tried 2 different demand loading techniques (HKEY_CURRENT_USER directory and HKEY_LOCAL_MACHINE).

In both cases, I insert the following keys into "Software\Autodesk\AutoCAD\{version}\{language}\Applications\OpPost":

'DESCRIPTION', 'Operations and Posting Window'
'LOADER', 'D:\Program Files\AutoCADOperationsPost\ACADOpsPost.dll'
'LOADCTRLS', 2
'MANAGED', 1

and the following in "Software\Autodesk\AutoCAD\{version}\{language}\Applications\OpPost\Commands":
'LoadPost', 'LoadPost'
Message 3 of 7
arcticad
in reply to: Anonymous

I'm suspecting that you have not set the dll's:
acdbmgd and acmgd, copy local to false.
This would cause the commands to not be recognized.
---------------------------



(defun botsbuildbots() (botsbuildbots))
Message 4 of 7
Anonymous
in reply to: Anonymous

When I set copy local to false, my dll cannot find them. How do I fix this?
Message 5 of 7
arcticad
in reply to: Anonymous

I'm not sure what your doing, If you can post a sample project it may help.

C:\Program Files\AutoCAD 2010\acdbmgd.dll
C:\Program Files\AutoCAD 2010\acmgd.dll

These should be pointed here.
---------------------------



(defun botsbuildbots() (botsbuildbots))
Message 6 of 7
Anonymous
in reply to: Anonymous

Ah I had them in the wrong location. Thanks!
Message 7 of 7
arcticad
in reply to: Anonymous

Your Welcome.
---------------------------



(defun botsbuildbots() (botsbuildbots))

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