San,
Sorry, I read your post a bit to quickly.
You can filter selections without using MDL. In the Pulldown Menus go to
Edit->Select By Attributes. This open a dialog box that let you up
various selection criteria. In the Mode Group Box (lower left) make sure
the middle button is set to Location. Now any tool use use will be
limited to the criteria you set up.
----------
If you still want to do something in MDL here are some _very brief_ tips
for Microstation/J (V7). V8 will be a bit different.
Start your MDL command and use mdlState_startPrimitive (..) to collect
two data points to define a rectangular area.
Use mdlState_setFunction ( STATE_COMPLEX_DYNAMICS,yourDynamicsFunction)
so you can show the user the rectangle being drawn based on the position
of the cursor relative to the first point before the second point is
placed.
When the second point is placed use the mdlScan_... functions to set up
the filter settings you want and scan the file. These will include
setting the low and high scan limits to the area defined by the data
points entered. All elements matching your criteria and overlapping the
scanning limits you set will be returned.
Loop through the returned elements and use mdlSelect_addElement(...) to
add them to a selection set.
Restart the command to define another selection area.
Well, as I said this is very brief. I'm assuming you have some MDL
experience or else this won't help much.
Dan
San wrote:
> Dan,
>
> Thanks for the reply.
>
> I wanted to do this selection by MDL. Actually, while doing multi
> selection, i want to filter out the elements which i doesn't want. Say,
> for example i want only lines, dimensions and cells. While selecting, i
> take only these elements and filter out others.
>
> If you can assist me how i can do this by programetically(MDL), that
> would be a great help.
>
> Thanks again.
>
> San
>
> Daniel MacNeil wrote:
>> San,
>>
>> In Microstation you can use the Selection tools to select multiple
>> elements. These are the two Arrow icons. Selector and PowerSelector.
>> Check the Help on Usage options.
>>
>> Also, you can pick any command first and then operate on various
>> individual elements in turn.
>>
>> Dan
>>
>>
>> San wrote:
>>> Dear All,
>>>
>>> In AutoCAD, the user can select the elements using window(standard or
>>> crossing). Can this be possible in UStation through MDL.
>>>
>>> In UStation if user wants to do any manipulation, either he need to
>>> select single element or place a fence, before doing something. I am
>>> looking for a example code for multiple selection to do my task
easier.
>>> I'll be obliged if anybody could help me out.
>>>
>>> Thanks in advance
>>>
>>> Regards,
>>> san
>>>
>


|