commandmethod

commandmethod

Anonymous
Not applicable
1,486 Views
4 Replies
Message 1 of 5

commandmethod

Anonymous
Not applicable
How come I only get "Autodesk.AutoCAD.Runtime.CommandMethodAttribute"
instead of getting "Autodesk.AutoCAD.Runtime.CommandMethod"
I can´t find CommandMethod

I'm using ACAD2006 and NetFramework 2.0

--
Saludos, Ing. Jorge Jimenez, SICAD S.A., Costa Rica
0 Likes
1,487 Views
4 Replies
Replies (4)
Message 2 of 5

Anonymous
Not applicable
BTW, this started to happen after I upgraded the framework from 1.1 to 2.0

--
Saludos, Ing. Jorge Jimenez, SICAD S.A., Costa Rica


"Jorge Jimenez" wrote in message
news:5005301@discussion.autodesk.com...
How come I only get "Autodesk.AutoCAD.Runtime.CommandMethodAttribute"
instead of getting "Autodesk.AutoCAD.Runtime.CommandMethod"
I can´t find CommandMethod

I'm using ACAD2006 and NetFramework 2.0

--
Saludos, Ing. Jorge Jimenez, SICAD S.A., Costa Rica
0 Likes
Message 3 of 5

Anonymous
Not applicable
CommandMethodAttribute and CommandMethod are one and the same. .NET naming standards dictate that attributes have "Attribute" at the end of the name. While this is not required, if the attribute type name ends in "Attribute", the compiler will allow you to type the attribute name without the "Attribute" at the end. For example, I could do either when defining an attribute in VB .NET or
Message 4 of 5

Jedimaster
Collaborator
Collaborator

It is the Application target framework  .net version is the reason why you see one and not the other Autodesk.AutoCAD.Runtime.CommandMethod seems to only be in 4.5 or higher otherwise you see only Autodesk.AutoCAD.Runtime.CommandMethodAttribue. I could be wrong about this have been racking myself silly for four days to realize why I Kept  getting Error  Type 'Autodesk.AutoCAD.Runtime.CommandMethod' is not defined. My default is set to 4.0

0 Likes
Message 5 of 5

ActivistInvestor
Mentor
Mentor

CommandMethod and CommandMethodAttribute are one and the same.

 

The compiler allows attributes whose names end with 'Attribute' to be abbreviated to exclude the Attribute.

 

If you're getting that error, it's most-likely because your target framework is not the same as the framework of the managed assemblies that you're referencing.

 


@Jedimaster wrote:

It is the Application target framework  .net version is the reason why you see one and not the other Autodesk.AutoCAD.Runtime.CommandMethod seems to only be in 4.5 or higher otherwise you see only Autodesk.AutoCAD.Runtime.CommandMethodAttribue. I could be wrong about this have been racking myself silly for four days to realize why I Kept  getting Error  Type 'Autodesk.AutoCAD.Runtime.CommandMethod' is not defined. My default is set to 4.0




0 Likes