Copy link to clipboard
Copied
Hi,
I want to store the current document file path into a string, I tried the AIDocumentSuite, and
AIAPI AIErr(* AIDocumentSuite::GetDocumentFileSpecification)(ai::FilePath &file) .
Its ended in prameter conversion error (c 2664). Can anyone guide me to get the current file path.
Thanks in advance
Sreejesh K V
1 Correct answer
ai::FilePath file;
AIErr error = sDocument->GetDocumentFileSpecification(file);
if (error != kNoError) {
// there was a problem
}
Explore related tutorials & articles
Copy link to clipboard
Copied
You shouldn't need to be admin to use that function, nor any other function really. I'm not sure what the problem is. If you got kNoErr then it returned a valid ai::FilePath. I suppose you should also check if the file path is empty with ai::FilePath::IsEmpty(). Then call ai::FilePath::GetFullPath() and check the string as well. ai::UnicodeString has a length() method & an empty() method you can check. If those indicate the string is non-empty and has some reasonable length, then its just something about the way you're getting the internal string.
Copy link to clipboard
Copied
Thank you for instant reply, let me try it out I will update you the result.
Copy link to clipboard
Copied
Hi,
Now i can fetch the path, the problem was with the string handling and the fetcing file path from the FilePath object.
Thanks a lot for your valuable posts!
Is it possible to pass a parameter to an url using OpenURL function ? for example i am having the string MyString="Test",I have to send MyString to an Url , so that i can access the value "Test" from the url ( web application)
i tried like this
ASBoolean success = sAIURL->OpenURL("http://192.168.1.109/DMS%20NW/Default.aspx?p1=MyString"); it is opening the specified url in internet explorer and i am not getting the value "Test", its just giving p1=Mystring
i have tried the ShellExecute() also and it is showing the same result as OpenURL
This is what i tried!
ShellExecute(NULL,"open", http://192.168.1.109/DMS%20NW/Default.aspx?foobar",p1=MyString", "c:\\", SW_SHOW);
Can you give some idea!
Thanks and Best Regards
Sreejesh K V
Copy link to clipboard
Copied
I would have thought:
ShellExecute(NULL,"open", http://192.168.1.109/DMS%20NW/Default.aspx?p1=MyString", NULL, c:\\", SW_SHOW);
would have worked, but I'm not sure. ShellExecute() is what you want from what I understand.
Copy link to clipboard
Copied
its works,
ShellExecute() and OpenURL() are working fine, Now i can send the parmeter to the url using both functions.
The problem was with the way i am binding the parameter with the url!
Thanks and Best Regards
Sreejesh K V
-
- 1
- 2