Getting ViewContext from IViewManager

Hi guys,

 On including the IViewManager.h to my application i got this error msg.

 C:\PROGRA~1\Bentley\MICROS~1\MICROS~1\mdl\MicroStationAPI\interface\IViewManager.h(126) : error C2061: syntax error : identifier 'IRedrawOperation'

I checked the function in the documentation and its like this

void DoElementAgendaDynamics (ElementAgendaP, IRedrawOperation *, ClipDescrP)

and in the header file its like this

MSCORE_EXPORT void DoElementAgendaDynamics (ElementAgendaP, IRedrawOperation*, ClipDescrP);

So both looks same but still getting the error....any idea why?

 Thanks and Regards,

Arpan

  • Can anyone confirm if there is any point limit for DrawPointString3d(...) function?
    Thanks and Regards,
    Arpan
  • Yongan.Fu[Bentley]:
    14170000 points just do a simply display ?

    Actually i donot want any restriction to the points i draw from my code. It could be any where till 20000000 or more.

    Yongan.Fu[Bentley]:
    Yes, you should put all points in _pts array. Consider performance issues, the _reducedPts array is created from _pts just used to display a profile of your data in dynamic mode.

    Thanks a lot for the explanation.

  • Arpan:
    Yongan, with size for reduced points to MAX_PNT/10000, i am able to draw 14170000 points without any problem. More than that points are not showing in the design file. There is no crash but it simply not showing anything.
    14170000 points just do a simply display ?
    Arpan:
    Can't i experiment with DrawPointCloud with this version? Function is listed there in MicroStationAPI.chm.
    I am not sure. At least I can not find a suitable method in PointCloudDrawParams to call to assign cloud data.
    Arpan:
    Is it compulsory to put all the points in _pts array? I am not getting the significance of this _reducedPts array.
    Yes, you should put all points in _pts array. Consider performance issues, the _reducedPts array is created from _pts just used to display a profile of your data in dynamic mode.
    Regards, Yongan



  • Yongan.Fu[Bentley]:
    What is the max amount number of your points?

    Yongan, with size for reduced points to MAX_PNT/10000, i am able to draw 14170000 points without any problem. More than that points are not showing in the design file. There is no crash but it simply not showing anything.
    Yongan.Fu[Bentley]:
     Maybe new DrawPointCloud method will give us a help. (PointCloud will be published at next release)

    Can't i experiment with DrawPointCloud with this version? Function is listed there in MicroStationAPI.chm.

    And also Yongan, i also notice in _pts array you are putting all the points (MAX_PNT), i tried to split the points between the _pts array and _reducedPts arrays. But its showing half points only. Is it compulsory to put all the points in _pts array? I am not getting the significance of this _reducedPts array.

    Regards,
    Arpan

  • Seems due to some limitation of DrawPointString3d. What is the max amount number of your points ? Maybe new DrawPointCloud method will give us a help. (PointCloud will be published at next release)

     



  • Thanks a lot Yongan to look into the matter. Here are my observations :
    1)      No of points = 4000000
            a.   With DRAW_PURPOSE_FitView case           -------------    Working fine (Fit view working)
            b.   With out DRAW_PURPOSE_FitView case     -------------    Working fine (Fit view not working)

    2)      No of points = 10000000
            a.   With DRAW_PURPOSE_FitView case           -------------   Crashing (Only after i am trying for fit view)
            b.   Without DRAW_PURPOSE_FitView case     -------------    Not Crashing (Fit view also not working)

    If we give the size of  _reducedPts as MAX_PNT/1000 (in case of 10000000), its working fine.
    Any idea guys, what is happening here?

    Regards,
    Arpan

  • When I uncomment your DRAW_PURPOSE_FitView case, Fit View can work well. Please see my attachment. I modified some in your code.



    ViewTransients.zip
  • Yongan.Fu[Bentley]:
    5000000 :  Crash ! ! ! So, maybe DrawPointString3d has some limitation for its displayed points.

    Yongan, I got it working for 10000000 points. Did you find any reason why fit view is not working with my code?
  • Hi Arpan, Your MAX_PNT is 10 times of mine. I test in my box for this number. Result is as below:
    1000000  : No crash
    2000000  : No crash
    4000000 : No crash
    5000000 :  Crash ! ! !
    So, maybe DrawPointString3d has some limitation for its displayed points.



  • I tired to make it as simple as i can but still getting the problem. If i am using Fit view Draw Purpose but its getting MicroStation crashed also sometimes.
    I am not able to figure out the problem so posting code here....please have a look and tell what is the problem. Three main files are MyViewTransients.cpp, ViewTransients.cpp and MyViewTransients.h

    ViewTransients.zip