Named Expression checks for Reference Slot Use

THE BOTTOM LINE
I need a Named Expression that will test whether Reference Slot Number "x" is occupied with an attachment in the active model, and if so, is it currently being displayed. If there is an attachment and it is displayed, it needs to evaluate as True by the named expression.

Alternatively, just see if Slot "x" has an attachment, whether displayed or not.


MORE INFORMATION
I have a custom toolbar that functions a little like the View Groups toolbar where the eight numbers toggle on and off views 1-8. But my toolbar displays not 1-8, but 0-20, and clicking a number (tool) would display only that ref file attachment. That is, say when I click "4", the tool would execute a command string "update file 4;selview 1" to temporarily display only reference attachment number 4 in View 1, if it exists. Just move or pan or zoom, and you are back to viewing normally.

In the interest of screen space, what I would like to do is limit the display of numbers on the custom toolbar to only the ref attach slots that really contain an attached file AND have their display turned on.

I think the technique is to add a Show/Hide test on the tool definition. I think the test will also require some Named Expression to be defined as well. I haven't figured how to write the Named Expression it will require. I think this is simple, but I don't have the skills to do it myself.

Where are some resources that can show me how to learn to make Named Expressions?

CONSIDERATIONS
Assumptions - these events would/may trigger an immediate change in the toolbar:
1. Moving from one model to another.
2. Adding or deleting ref attachments.
3. Toggling a ref Display On/Off.

Are these assumptions erroneous or good? I really don't want the toolbar expanding and contracting in size to mess up my docked arrangements.

Parents
  • Jan, thanks for getting back with me.  I couldn’t decide which forum was most appropriate, but I had to choose.  Before posting, I re-read the forum guidelins for needed info and apparently overlooked the product and version, my apologies.  MicroStation V8i (SS4) 08.11.09.832.
     
    Let me express my gratitude for your level of detail in your response.  I find it very helpful to get the deeper knowledge of your response as to why/ why not and your reasoning.  This is very beneficial in my learning process and is much appreciated.
     
    I can see I am well over my head on this issue.  I’m opting for saving space by breaking my one big toolbar into smaller ones, and opening the smaller toolbars as needed.  Likely, I will keep one open always, maybe a 0-6 or something on that order for starters, adding a button to open the next toolbar.
     
    Again, I so appreciate the extra info you supplied.  Knowing the ‘why’ behind the answer helps me better understand the product(s) and make more informed decisions in the future.  Thanks for walking me through this!
     
    -Pat
     

    Answer Verified By: Patrick Coyne 

Reply
  • Jan, thanks for getting back with me.  I couldn’t decide which forum was most appropriate, but I had to choose.  Before posting, I re-read the forum guidelins for needed info and apparently overlooked the product and version, my apologies.  MicroStation V8i (SS4) 08.11.09.832.
     
    Let me express my gratitude for your level of detail in your response.  I find it very helpful to get the deeper knowledge of your response as to why/ why not and your reasoning.  This is very beneficial in my learning process and is much appreciated.
     
    I can see I am well over my head on this issue.  I’m opting for saving space by breaking my one big toolbar into smaller ones, and opening the smaller toolbars as needed.  Likely, I will keep one open always, maybe a 0-6 or something on that order for starters, adding a button to open the next toolbar.
     
    Again, I so appreciate the extra info you supplied.  Knowing the ‘why’ behind the answer helps me better understand the product(s) and make more informed decisions in the future.  Thanks for walking me through this!
     
    -Pat
     

    Answer Verified By: Patrick Coyne 

Children
No Data