current dwg file name

current dwg file name

Anonymous
Not applicable
1,205 Views
16 Replies
Message 1 of 17

current dwg file name

Anonymous
Not applicable
Hello alexander,
Can u plsss tell me how to print this filename
0 Likes
1,206 Views
16 Replies
Replies (16)
Message 2 of 17

Anonymous
Not applicable
http://discussion.autodesk.com/thread.jspa?messageID=5333453&tstart=0#5333453
0 Likes
Message 3 of 17

Anonymous
Not applicable
Thanx Alexander u r very helpfull.
one more small thing hope i m not harrasing u
this complete thing gives me the entire path along with the filename is their any way to get the filename only
eg: i m getting this output -> c:\sapcad\testfile.dwg.
i want only "testfile"string
thanx for great help
0 Likes
Message 4 of 17

Anonymous
Not applicable
_splitpath




wrote in message news:[email protected]...
Thanx Alexander u r very helpfull.
one more small thing hope i m not harrasing u
this complete thing gives me the entire path along with the filename is
their any way to get the filename only
eg: i m getting this output -> c:\sapcad\testfile.dwg.
i want only "testfile"string
thanx for great help
0 Likes
Message 5 of 17

Anonymous
Not applicable
hello Alexander can u please tell me how to use it
thanx
0 Likes
Message 6 of 17

Anonymous
Not applicable
void _splitpath(
const char *path,
char *drive,
char *dir,
char *fname,
char *ext
);


Parameters
path Full path
drive Optional drive letter, followed by a colon (:)
dir Optional directory path, including trailing slash. Forward
slashes ( / ), backslashes ( \ ), or both may be used.
fname Base filename (no extension)
ext Optional filename extension, including leading period (.)



This has really nothing to do with objectARX


wrote in message news:[email protected]...
hello Alexander can u please tell me how to use it
thanx
0 Likes
Message 7 of 17

Anonymous
Not applicable
Hello Matt,
I dont know wether this is related to ObjectARX or not I just wanted to know how to obtain the current drawing file name
Can u pls tell me what exactly this function does??
i m sending the Part of code I have written tell me wether where its wrong since its giving me access violation error at runtime
ACHAR *one;
ACHAR *two;
ACHAR *three;
ACHAR *four;

const ACHAR *dwgfilename = curDoc()->fileName();

_splitpath(dwgfilename,one,two,three,four);
0 Likes
Message 8 of 17

Anonymous
Not applicable
ACHAR one[_MAX_PATH];
ACHAR two[_MAX_PATH];
ACHAR three[_MAX_PATH];
ACHAR four[_MAX_PATH];
_splitpath(curDoc()->fileName(),one,two,three,four);

P.S.: Sorry, but I have not time to teach you base level of C/C++

Message was edited by: Alexander Rivilis
0 Likes
Message 9 of 17

Anonymous
Not applicable
Hello alexander,
I m sorry if my questions where toooo basic 😞

Actually I m working on Autocad-SAP interface development using VC++ as the middleware. I m currently in third year of my graduation hence I never ever worked on niether SAP nor Autocad before this I m on this project from last 2 months

ObjectARX is very new to me I dont know properly about its SDK ie what all classes are there and which all methods/funtions are there Before asking u I searched in the SDK but I could not locate anything .This was my first question after registering for this forum
Can u please tell how to efficiently search the SDK to locate what ever I need I hopre u r getting my problem.
eg : Now I dont know which class contains the function _splitpath function what parameters it takes and what exactly it does??

I m using the SDK that generally comes with ObjectARX deelopers guide

I hope u would help me further also

Thanx & Regards,
condolesaP
0 Likes
Message 10 of 17

Anonymous
Not applicable
wrote

>> Actually I m working on Autocad-SAP interface
>> development using VC++ as the middleware.

In that case, it may help if you were to learn basic C++
programming first, as what you may not realize is that
your questions make it somewhat obvious that you are
lacking that crucial prerequisite to AutoCAD/ObjectARX
development.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005/2006/2007
http://www.acadxtabs.com
0 Likes
Message 11 of 17

Anonymous
Not applicable
Search _splitpath at MS VS Help (press F1 buttom). It is not ObjectARX function but standard C/C++ function.
0 Likes
Message 12 of 17

Anonymous
Not applicable
Thanx alexander,
I got the function description I am using it its working fine and my work is completed but plsss let me know about ObjectARX SDK more how to use it and explore it is their any other way than looking into ObjectARX Developers guide.
Something comfortable as it is in java
Thanx&regards
condolesaP
0 Likes
Message 13 of 17

Anonymous
Not applicable
This link help you understand first steps in ObjectARX: http://arxdummies.blogspot.com/
I do not know other way except reading ObjectARX help/documents, studding examples and more programming with using ObjectARX.
0 Likes
Message 14 of 17

Anonymous
Not applicable
Have a look at .net API
Maybee you're more comfortable there.
There's a special newsgroup about that.


wrote in message news:[email protected]...
Thanx alexander,
I got the function description I am using it its working fine and my work
is completed but plsss let me know about ObjectARX SDK more how to use it
and explore it is their any other way than looking into ObjectARX Developers
guide.
Something comfortable as it is in java
Thanx&regards
condolesaP
0 Likes
Message 15 of 17

Anonymous
Not applicable
Thanx Matt I will definitely search and refer this API
0 Likes
Message 16 of 17

Anonymous
Not applicable
Hi
please help me
can we know name of dwg file
thanks and regards
0 Likes
Message 17 of 17

Anonymous
Not applicable
Hello Alexander
please help me
can we know name of dwg file
thanks and regards
0 Likes