ObjectARX

ObjectARX

Reply
Member
Bhong.ND
Posts: 3
Registered: ‎08-12-2012
Message 1 of 2 (158 Views)

Query about "AcDbDatabase::readDwgFile" input

158 Views, 1 Replies
09-04-2012 07:03 AM

Hi,

 

Whether is it ok to pass relative file path as input to "AcDbDatabase::readDwgFile" method?

 

In our application, we traverse xRef graph.

These xRefs can be stored with relative path to the main parent drawing.

While debugging xRef traversal, found that "AcDbDatabase::readDwgFile" is working fine with relative paths on Windows xp (64 bit) machines but same code is failing on Windows 7 (64 bit) machine.

 

Also tried similar code in an independent test arx command  on Windows XP (64 bit) but there also "AcDbDatabase::readDwgFile" is failing for relative paths and working fine with full paths.

 

So confused with expected input for "AcDbDatabase::readDwgFile".

If full path is always requried for ""AcDbDatabase::readDwgFile" then why it is working fine in my main application on XP where relative paths were given.

 

Thanks a lot for your time and support.

 

With regards

ND.

 

 

Distinguished Mentor
owenwengerd
Posts: 686
Registered: ‎08-06-2002
Message 2 of 2 (151 Views)

Re: Query about "AcDbDatabase::readDwgFile" input

09-04-2012 11:09 AM in reply to: Bhong.ND

I would guess that readDwgFile will open files relastive to the current working directory, whereas the xref path is relative to the directory containing the host database drawing file. I don't think you can assume these are always the same directoryor  using the same search path.

--
Owen Wengerd
ManuSoft
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.