Nevron Forum

Document vs Drawing?

https://www.nevron.com/Forum/Topic7582.aspx

By Jason Irby - Wednesday, March 13, 2013

 

In NPersistencyManager there is LoadFromFile, LoadDocumentFromFile, LoadDrawingFromFile.....

 

Are those all the exact same thing?  Is there a difference between document and drawing? vs LoadFromFile?

-Jason

By Nevron Support - Thursday, March 14, 2013

Hi,

The LoadDocumentFromFile method analyzes the provided file name and load a library or a drawing document, depending on the file extension, while the LoadDrawingFromFile and LoadLibraryFromFile methods expect and load a drawing document and a library document respectively. So if you know whether you are loading a drawing document or a library document, it is better to use the corresponding method. In this way there won't be any unecessary checks and you won't have to cast the read document to a drawing or a library document later on.