muck 发表于 2022-7-6 22:07:54

AutoCAD Vb.net, What is a eLoc

I am working on some VB.net an I am geting eLockViolation error message.
That is that? I know has something to do with locking the AutoCAD database
before change but I don't understand what it is and how to avoid it.
 
Thank you,

ReMark 发表于 2022-7-6 22:16:39

Check this out.
 
http://forums.autodesk.com/t5/NET/eLockViolation-error-code-creating-a-new-layer-and-make-it-work/td-p/3218810

muck 发表于 2022-7-6 22:23:39

Yes, I looked at that thread yesterday.
I still need some good examples and a explanation of what it is.
I guess if a person thought a AutoCAD dwg file as a book a document
would be a page in that book? Maybe?
Thank you,

BlackBox 发表于 2022-7-6 22:34:23

You keep asking ambiguous questions, without posting any code.
 
Have you read the documentation on this at all? Since I do not know your exact situation (no code), consider reading up on how to Lock and Unlock a Document
 
HTH

muck 发表于 2022-7-6 22:34:37

Ok, According to the link the Using statement ends the database is unlocked.
 
Is a document considered to be a layout?
 
Thank you,

BlackBox 发表于 2022-7-6 22:43:57

 
... What does Object Browser tell you about the difference between the Document, and Layout Types?

muck 发表于 2022-7-6 22:52:14

Layout is under Autodesk.AutoCAD.Database.Services. in object browser.

BlackBox 发表于 2022-7-6 22:55:14

 
Correct; what Namespace is the Document Type found?

muck 发表于 2022-7-6 23:07:20

Autodesk.AutoCAD.Application.Services

KeithBrown 发表于 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 markedtype 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
页: [1]
查看完整版本: AutoCAD Vb.net, What is a eLoc