acutWcMatchEx problem ?
I ported a function from ARX to BRX. Could it be acutWcMatchEx gives me different results ?
I tested it with exactly the same strings on ACAD and BCAD and it seems that my results are different...
Comments
-
Dear Dirk, I just reviewed our implementation of "acutWcMatchEx()" - there was indeed a wrong logic implemented, which was not detected by our BRX test system :-(
I just fixed the implementation, and extended the test code - now the former problem was correctly detected, and both implementation and test code are fine now.
As a workaround, until next BRX is shipped, you might convert both the string and the pattern to either uppercase or lowercase, and use acutWcMatch() instead - this is fine.
Many thanks for your feedback !
0 -
ok, i'll try that, thx for the fast feedback.
0 -
i tried that and it doesn't seem to solve my problem.
Doing this and trying to verify something in a drawing i used FIND command. It seems that there a wildcard problems too...
I have texts 288X3, 288A3 etc... in the drawing.
When entering 288* i get no results ?... However 288X3 (a complete match) gives me a correct result.
regards,
0 -
Ooops - I'm not sure whether FIND command does allow wildcard searching ? Will try this ...
Regarding BRX : can you send an acutWcMatch(Ex) sample statement, with string and pattern, that does not work ?
Would be most interesting for me (and all of us) ... many greetings0 -
void
CFindPtDlg::OnBnClickedFind(){
UpdateData(TRUE);
index = m_ctlSect.GetCurSel();CMap<CString, LPCTSTR, AcDbObjectId, AcDbObjectId> *pMapParcel =
(CMap<CString, LPCTSTR, AcDbObjectId, AcDbObjectId>*)m_ctlSect.GetItemDataPtr(index);
(pMapParcel == NULL || pMapParcel->IsEmpty()){
MessageBox(_T(), NULL, MB_OK);
;}
m_aryId.removeAll();
(POSITION pos = pMapParcel->GetStartPosition(); pos != NULL; ){
CString sTemp;
AcDbObjectId id;
pMapParcel->GetNextAssoc(pos, sTemp, id);
sTemp.MakeUpper();
(m_strParcel.IsEmpty() || acutWcMatch(sTemp, m_strParcel.MakeUpper()))m_aryId.append(id);
}
(m_aryId.logicalLength() == 0){
SetDlgItemText(IDC_RESULT, _T());PASTE CODE HERE
0 -
oops sorry about that.
shouldn't wildcard need to work on FIND ?...
0 -
Dear Dirk, I mean a direct example like
acutWcMatch(_T("myText"), _T("my*"));
or similar :-)Can you give me such sample where acutWcMatch(Ex) does fail ?
0 -
hi, sorry for late respond, been too busy...
Solved it now.
(acutWcMatch(sTemp.MakeUpper(), m_strParcel.MakeUpper()) == RTNORM)
thx
0 -
Dear Dirk, do you also have a sample, where acutWcMatchEx() failed - I mean, with particular strings ?
Thus we will be able to investigate and fix (our current tests are all fine).0 -
hi,
as far as i know it didn't work in any case. But this was probably caused by the same reason (not using ==RTNORM). However these functions worked fine in acad before.
Because you said "Dear Dirk, I just reviewed our implementation of "acutWcMatchEx()" - there was indeed a wrong logic implemented,"
I didn't look into it further. I don't think there is a problem other then i had to use RTNORM. I didn't test it with acutWcMatchEx() now tho because for me the problem is solved.
regards
Dirk
0 -
With regards to the "find" command, wildcards don't work. ( ... bummer! :-) ... maybe the Bcad developers could put that on their list? like (wcmatch ... ) ? )
But if you want to find (as in your example) texts "288X3", "288A3" etc... in a drawing
you should enter "288" without the axterix, and it will find every text that contains "288"
(as though you entered *288*).
(The "options..." button can enable "Find whole words only" if you need to find only "288")
0 -
thx for the suggestion.
btw: if this the only 'major' problem i came across after porting more then 2600 functions, i must say Bricscad is ..... brilliant !
0