Microstation To Find Line Or Arc Of Best Fit.

Hi all

I have a problem which I was hoping someone could help with.

I have entered approx 40 x, y, z co-ordinates into microstation using the XYZ text tool box.

What I would like to do is get microstation to find either a line of best fit or an arc of best fit by selecting a series of points. Once the line/arc has been created I want to know how far away the points are from the line or arc.

After browsing the functionality I have struggled to come up with anything. I am currently using Microstation Select Series 2.

Can anyone help?

(I’m a bit dense so screen shots will help a great deal. Lol)

Thanks

 

Parents Reply Children
  • I just realised its linear only but it still does it in the same spot  with new points as crosses..

    If it was working from selection then Id expect it to land near original points ...hmmm looking at the code I'm no closer to why?

    Lorys

    Started msnt work 1990 - Retired  Nov 2022 ( oh boy am I old )

    But was long time user V8iss10 (8.11.09.919) dabbler CE  update 16 (10.16.00.80) 

    MicroStation user since 1990 Melbourne Australia.
    click link to PM me 

  • Unknown said:
    It seems to always put the answer in the same spot

    The VBA example provides its own data, with the GetData method.  It's not looking for any other data.

    Unknown said:
    Do you put all the active points into a selection set then run the macro?

    I made no claim about active points or selection sets.  The example illustrates a programmatic solution to the original question.  If you want to collect data from another source, it's up to you to modify the code to achieve that.

    [Edit]

    Stefan Bernsdorf has kindly added code to use a selection set of MicroStation point objects.  His additions are included in the modified VBA project available here.

     
    Regards, Jon Summers
    LA Solutions

  • ok that would explain it ... thanks still pretty cool bit of coding .. need to study more...

    Lorys

    Started msnt work 1990 - Retired  Nov 2022 ( oh boy am I old )

    But was long time user V8iss10 (8.11.09.919) dabbler CE  update 16 (10.16.00.80) 

    MicroStation user since 1990 Melbourne Australia.
    click link to PM me 

  • Hi Lorys,

    anyone mind if I add the desired functionality ;-)

    Regards, Stefan.

  • no go ahead please... but its still only linear regression.....

    it would be really nice if it could determine linear or logarithmic from correlation coefficient then use the best fit equation for the type of curve like excel does  or like I  did in statistical analysis back in college before excel could do it we did it with Texas instrument basic ... I could find the equations ( still have my old text book)  but I no longer have the program code I wrote for basic  which asked for keyin points then run if linear gave the R squared  value  and if logarithmic gave the R squared  value .. and  you then decided the closest to one  is the type of curve and it then gave you the equation of the curve.... and I wrote all that on my Commodore 64 ( C64) with floppy disk drive for my final project at college to determine the data from experimental results ... it sure was fun learning the math then applying it to TI Basic  to solve real problem and it saved me hundreds of hours calculations for 25 different experimental trials ..

    Excel makes it too easy now...arent we all glad of that!

    Lorys

    Started msnt work 1990 - Retired  Nov 2022 ( oh boy am I old )

    But was long time user V8iss10 (8.11.09.919) dabbler CE  update 16 (10.16.00.80) 

    MicroStation user since 1990 Melbourne Australia.
    click link to PM me