[Microstation V8i C#] Highlight reference file with red color and change file name by code

Hi all,

If I open a Microstation DGN file from ProjectWise, if a reference file has been deleted from ProjectWise it is highlighted with red color and the File Name is changed.

How can do the same in C# or C++? Which API should I use?

Thanks for your help.

Parents
  • HI,

    be aware this is general Developer and Programming forum, but your question is about MicroStation. I recommend to move it to MicroStation Programming forum. To move existing post to another forum, use More > Move tool, available under your original post (but do ask again in another forum, so questions are not duplicated).

    f a reference file has been deleted from ProjectWise it is highlighted with red color and the File Name is changed.

    Yes, red color means "The reference was not found, so it is not attached.", which can happen when file does not exist anymore or was renamed as you wrote, but also when it exists but model was deleted or renamed.

    How can do the same

    You cannot: MicroStation API represents access to platform / core, not to specific MicroStation end user tools. References dialog (and the most of other dialogs as well) are "black boxes", and it is expected when developer want similar, but not the same, functionality, he implements new GUI with requested features.

    Why you want to change the color? The red color meaning is defined and fixed.

    How can do the same in C# or C++? Which API should I use?

    C# in V8i is very limited, because it is equal to VBA (based on the same COM model). Depending on required functionality (in other situations than the discussed one), often C/C++ is required.

    With regards,

      Jan

    Answer Verified By: IronMonkey 

Reply
  • HI,

    be aware this is general Developer and Programming forum, but your question is about MicroStation. I recommend to move it to MicroStation Programming forum. To move existing post to another forum, use More > Move tool, available under your original post (but do ask again in another forum, so questions are not duplicated).

    f a reference file has been deleted from ProjectWise it is highlighted with red color and the File Name is changed.

    Yes, red color means "The reference was not found, so it is not attached.", which can happen when file does not exist anymore or was renamed as you wrote, but also when it exists but model was deleted or renamed.

    How can do the same

    You cannot: MicroStation API represents access to platform / core, not to specific MicroStation end user tools. References dialog (and the most of other dialogs as well) are "black boxes", and it is expected when developer want similar, but not the same, functionality, he implements new GUI with requested features.

    Why you want to change the color? The red color meaning is defined and fixed.

    How can do the same in C# or C++? Which API should I use?

    C# in V8i is very limited, because it is equal to VBA (based on the same COM model). Depending on required functionality (in other situations than the discussed one), often C/C++ is required.

    With regards,

      Jan

    Answer Verified By: IronMonkey 

Children
No Data