Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

EKL wildcard for Query String

Status
Not open for further replies.

solid7

Mechanical
Jun 7, 2005
1,403
0
0
US
List > Query(type : String, condition : String) : List

Anyone have a clue how to use the EKL Query method with string wildcards? I'm going to give the example of what I want to do, tell me how I actually do it.

ioAttCurveList = Construction\Curves\BoundaryCurves ->Query( "Curve" , "x.Name == \"*Boundary\"" )

The idea is to search the Geo Set paths for any curves that have "Boundary" in the name, and return it to the List. Wildcards just aren't working for me, and don't seem to be very well addressed in the documentation. All examples use length or integer values.

Thanks in advance.



 
Replies continue below

Recommended for you

Isn't that what I'm doing with the Query?

Specifically, what method do you propose? I do not see "search" as a method of any object type in EKL. The only other method that even seems close, is Access. However, this method is ideal for what I want, since it returns the results to the list, which I'll use in the next line of code.

To be clear - I already know that the line of code that I posted works perfectly, IF AND ONLY IF I used the exact object name. But there's no point in using the exact name, if I'm going to use the Query method. (I'd be better off just telling my code exactly which items to return)

I prefer to have a wildcard, if possible. Otherwise, I will change the object naming and Geo Set placement, to suit the method. But it would be better to settle it in the way that I've asked.

Thank you.



 
OK. I see what you're doing. But the Query string will return what I want to a list, in one call. I still have to do something with this, once I've actually found the search string. Not elegant.

My alternate solution is to rename my curves (I'm building them on the fly with a knowledge pattern) to all have the same name, but handle uniqueness by Geo Set placement. In that case, I can Query with exact name, no wildcard. But the nature of my question was, and still is... Can I use a wildcard in the Query string?

 
Is there a way to do an x.Name search for two different names? Doing something like Boundary or Edge....

I.E.
`Geometrical Set.1` ->Query("Point","x.Name->Search(\"Boundary\" or \"Edge\")>=0")

I know that the above line of code doesn't work but what would I use to get the results for either option.

Ryan Capriglione
NX/CATIA Power User
 
this should give you points with Boundary in the name.
if point name does not include Boundary the result of the Search will return -1 and filter out the point.

eklpoints_ktc84s.gif




Eric N.
indocti discant et ament meminisse periti
 
Status
Not open for further replies.
Back
Top