[v8i MDL] Selecting all elements in the same graphic group

Hi,

How can I select all elements in the same graphic group number?

Parents
  • Scan the model. Use mdlScanCriteria_createAllGGCriteria to specify a GG to be captured in the scan.

    If you mean literally 'select all elements', then use your scan callback function to add each found element to the selection set.

     
    Regards, Jon Summers
    LA Solutions

  • Unknown said:

    Scan the model. Use mdlScanCriteria_createAllGGCriteria to specify a GG to be captured in the scan.

    Thank you Jon. It seems mdlScanCriteria_creataAllGGCriteria function is usefull for this purpose. There may be an easier way.

    I want to simulate this in my custom move command;

    Move Element command working procedure is as follows;

    1. Select an element with Choose Element command.

    2. Select Move Element command.

    3. Click first point, this adds any other member element on the selection set by using graphic group numbers of selected elements. (This is what I am trying to do)

    4. Click second point to be moved.

    5. All selected elements and graphic group members are moved.

    Kind regards,

    Sedat Alis
    AEC Technology Inc.

  • I think you can do what you want using existing MicroStation functionality.  Investigate the GG Lock.  When the GG Lock is on, many operations apply to all members of the GG in addition to the element you select.

    No programming required!

     
    Regards, Jon Summers
    LA Solutions

  • Unknown said:

    I think you can do what you want using existing MicroStation functionality.  Investigate the GG Lock.  When the GG Lock is on, many operations apply to all members of the GG in addition to the element you select.

    No programming required!

    Thank you Jon. I think so. But GG Lock is not working as expected sometimes.

    Suppose that GG Lock is active and you have two elements in the same graphic group.

    1. When you select Move command, select element and move it. All elements in the same graphic group are moved. This is fine.

    2. When you select element using Choose Element command, select Move command and move it. Only selected element is moved even GG Lock is active. It seems this is a bug in SS3. In SS2, all elements are moved in the same graphic group.

    Kind regards,

    Sedat Alis
    AEC Technology Inc.

  • Unknown said:
    When you select element using Choose Element command, select Move command and move it. Only selected element is moved even GG Lock is active. It seems this is a bug in SS3. In SS2, all elements are moved in the same graphic group

    1. Post that observation to the MicroStation Forum, and ask if anyone else sees the same
    2. Submit a formal report, with evidence, about that bug to Bentley Systems. 
    3. Depending on MicroStation's internal logic for graphic groups, attempting a work-around with your own MDL may lead to other problems.

     
    Regards, Jon Summers
    LA Solutions

  • Unknown said:
    2. When you select element using Choose Element command, select Move command and move it. Only selected element is moved even GG Lock is active. It seems this is a bug in SS3. In SS2, all elements are moved in the same graphic group.

    The described behaviour was still so in previous versions of MicroStation, You could always overcome the GG lock with a selection set. If this beaviour is not so in your SS2 than you must have another version than I, where this is even so (just tested) I teached this to my students as a favour for the GG's.

    Michael



  • Michael Stark said:

    The described behaviour was still so in previous versions of MicroStation, You could always overcome the GG lock with a selection set. If this beaviour is not so in your SS2 than you must have another version than I, where this is even so (just tested) I teached this to my students as a favour for the GG's.

    Thank you Michael. GG Lock is not working properly with selection sets MicroStation versions SS3 and higher. In SS2, it is working fine as expected. Can you test with SS3?

    Kind regards,

    Sedat Alis
    AEC Technology Inc.

Reply
  • Michael Stark said:

    The described behaviour was still so in previous versions of MicroStation, You could always overcome the GG lock with a selection set. If this beaviour is not so in your SS2 than you must have another version than I, where this is even so (just tested) I teached this to my students as a favour for the GG's.

    Thank you Michael. GG Lock is not working properly with selection sets MicroStation versions SS3 and higher. In SS2, it is working fine as expected. Can you test with SS3?

    Kind regards,

    Sedat Alis
    AEC Technology Inc.

Children
  • Not sure what you're seeing, at my side the behaviour is the same for all installed versions of microstation and was so as long as I remember (/J '98). No matter if GG lock is on, when you have element in selection set, GG lock is ignored.



  • Michael Stark said:

    No matter if GG lock is on, when you have element in selection set, GG lock is ignored.

    Why? What is the logic here?

    What is the difference between "you have elements in selection set before entering command" or "you selected element after entering command" ? It is expected to have the same behaviour.

    Kind regards,

    Sedat Alis
    AEC Technology Inc.

  • Hi Ahmet,
    This is WAD(Work as Designed). Selection set is prior to GG lock.
    HTH, YongAn



  • Unknown said:
    Why? What is the logic here?

    I can only guess, but from my point of view, the logic is beeing enable to move one (or more) element(s) that is inside a graphic group relativ to the rest of the graphic group without needing to remove (them) from the GG and add it back after the movement or play with the GG lock.
    The behaviour is even consitent. If selection set exists it has a higher priority than GG lock.


    Michael



  • Unknown said:
    What is the logic here?

    The logic is ancient.

    MicroStation is an evolution of IGDS, which was invented in the 1980s.  See the History of MicroStation.  IGDS provided innovative idioms, such as fences and graphic groups.  Those concepts pre-date windows, icons, mouse and pointers (WIMPs) by several years.  In those days the selection set was not invented anywhere: they arrived as a common idiom with the Macintosh (1982) and in Windows even later.

    Selection sets were subsequently incorporated into MicroStation.

    So the logic of the two idioms is this:

    Graphic Groups (GGs) have always been a part of MicroStation.  Bentley Systems don't like to break existing idioms, so GGs have remained unchanged throughout the lifetime of MicroStation.  Named Groups are a 21st century evolution.

    Selection Sets arrived after GGs.  Recognising their value, but not wanting to break GGs, Bentley Systems designed the logic the way it is.  As YongAn writes — it works as designed (WAD).

     
    Regards, Jon Summers
    LA Solutions

  • Thank you Yongan and Jon. Jon's explanation is very good and I navigated on computer history for a while. :)

    I understand the logic of GGs and selection sets.

    When you look from customer point of view, they are expecting graphic grouped elements (even they are in selection set or not, it is not important for them) move together. That's all. :) If GG elements are not moved together they tell us this is a problem. :)

    Kind regards,

    Sedat Alis
    AEC Technology Inc.

  • Unknown said:
    What is the difference between "you have elements in selection set before entering command" or "you selected element after entering command" ? It is expected to have the same behaviour.

    Eh, not for me. If I select an element before I lock the GG, I expect that element to stay unlocked. There are definitely instances where you might want to move portions of a GG but not the entire group. Selection set prior to locking it is a logical way of doing that. I wouldn't expect these two cases to have the exact same behavior.

  • Just wanted to mention a couple things that may make you more productive with the current long-standing behavior of groups/selection sets.

    If you use the Element Selection tool in "Add" mode instead of "New" mode, when graphic group lock is enabled, selecting an element selects the group.

    You can create Named Groups instead. Named Groups have an option to select all members of the group when any member is selected. The Element Selection tool will honor this setting regardless of the current group lock state.

    HTH

    -B



    Answer Verified By: Sedat Alis 

  • Thanks Brian, never tested add-mode in this combination, this might be the reason why Ahmet saw different behaviour in SS2 and SS3. Good to know !

    For the named groups. They have one common problem. If you copy the elements, the new elements do no longer belong to a group, while after copying a GG all new elements where assigned to the next free GG. So while I prefer to use named groups for creating groups in drawings that are almost finished (i.e. lights for viz), they do not fit very well in some design process. From a developers point, I understand that there is a naming problem if you would automatically create new named groups when copying their elements. Nevertheless it makes them less usefull, compared to the old GG's, when you want the copied elements to stay grouped.



  • Michael Stark said:
    For the named groups. They have one common problem. If you copy the elements, the new elements do no longer belong to a group.


    Yes, it would certainly be a nice enhancement to provide the option to automatically create a unique name for the copies when possible. Since move not copy was speciially mentioned, Named Groups may still be a valid option.

    -B