-
Is it possible to open dwg-files in AcadSharp in read only mode? For instance when a dwg-file is opened in a CAD-app, |
Beta Was this translation helpful? Give feedback.
Answered by
DomCR
Oct 30, 2023
Replies: 1 comment
-
Hi @thorster,
const string _file = "../../../../samples/sample_AC1032.dwg";
static void Main(string[] args)
{
CadDocument doc;
FileStream fs = new FileStream(_file, FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
using (DwgReader reader = new DwgReader(fs))
{
doc = reader.Read();
}
exploreDocument(doc);
} I've tested this code while the file was opened by Autocad at the same time. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
thorster
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @thorster,
ACadSharp
supports a Stream as an input to read a file:I've tested this code while the file was opened by Autocad at the same time.