|
发表于 2022-7-6 23:14:26
|
显示全部楼层
Actually that is a little bit incorrect. This is how you can quickly and easily find the correct type using the object browser.
Open up the object browser and where it says browse make sure to change it to my solution. Next make sure you have at least referenced accoremgd.dll, acdbmgd.dll, and acmgd.dll in your project. Now in the textbox that is marked type in document. Depending on your current project you should have two items pop up in the Autodesk namespace that are a match. One is in the Autodesk.AutoCAD.ApplicationServices namespace and the other is in the Autodesk.AutoCAD.EditorInput.Editor namespace. One is a class and the other is a property. You will obviously want the one that is a class. You can tell the difference between the two by looking at their icons. If you are unsure of what the icons mean then look at this webpage.
So the correct namespace is Autodesk.AutoCAD.ApplicationServices and not Autodesk.AutoCAD.Application.Services.
Additionally your answer above for Layout is incorrect. It is not Autodesk.AutoCAD.Database.Services but Autodesk.AutoCAD.DatabaseServices |
|