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
Unknown said:After browsing the functionality I have struggled to come up with anything. I am currently using Microstation Select Series 2.
Have you checked all Curve Functions Toolbox from Microstation?
There is a Curve by Equation tool, also, but no help in the help file
Regards
Frank
since 1985: GIS, CAD, Engineering (Civil) Senior Consultant : [Autodesk Civil 3D , Esri ArcGIS, VertiGIS: in previous days : Bentley MS V4 - V8i, GeoGraphics, Bentley Map V8i, InRoads, HHK Geograf, IBr DAVID] : Dev: [C, C++, .NET, Java, SQL, FORTRAN, UML][direct quote by: http://en.wikipedia.org/wiki/Helmut_Schmidt]: "Wer Kritik übel nimmt, hat etwas zu verbergen"Wer Grammatik- und/oder Rechtschreibfehler findet, der darf sie behalten :-)
I used curve by equation tool a few times back in J and it only used to plot a curve given the equation not find the equation but it may have changed I'll have to go back and take a look .. might even have an old J training book lying around
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
it seems to always put the answer in the same spot... no matter where I have my points...
hmmmmm
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?
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...
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!
Unknown said: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
Perhaps it would be nice, but consider that this question is the first time (in two decades) that anyone has posted about linear regression.
Numerical analysis and regression algorithms have been around for over a century. Tools that are commonly used to manipulate arbitrary sets of data implement those algorithms. Excel is a good example, which is why Microsoft invested a lot of development time to create those tools you endorse.
Conversely, MicroStation is not commonly used to analyse random sets of data. One question in two decades about linear regression is not a big incentive to encourage anyone to put significant development effort into writing a similar set of tools for MicroStation. Find me one hundred customers and prove me wrong!
Unknown said:One question in two decades about linear regression is not a big incentive to encourage anyone to put significant development effort into writing a similar set of tools for MicroStation
That's why not so lot "Land Surveyors" are using plain Microstation :-),
but it's a common method for Surveying industries working with survey data.
Jon ,
I had said from the first post ...... its better done in excel and then use mstn for presentation...
I was saying it would be nice since Stephen was offering to make it work with linear and selection sets ... as you say 20 years on.... well it was more like 27 years ago when I decided to use my C64 to try to help me do the analysis to determine what kind of curve was most likely from experimental data and what equation for line of best fit would be .. those were great days when anybody with a mathematics text book and home computer owners manual could write such a program in basic ( yes we know you love VBA) but I cut my teeth on basic ( hence my soft warm fuzzy feeling for it) and was great justification for having bought the computer 8 months before "...not just for games honey..." ( yeah right) ... it took me months at home after night school to debug and prove it but it got me a high distinction to merge mechanics , mathematics , computer science and statistical analysis and drafting to determine the calibration scales and manufacture of the Inclined Viscometer Gauge for used Locomotive engine oil testing for my final year project...
As to anyone wanting this in 20 years ... isnt it why its in Inroads or the survey part of Inroads and excel .. and if nobody really wanted it why was there an already to go vba example on your own home page... Jon your getting too worked up about this stuff.. I was just reminiscing about my old C64 and how much fun getting into programming was when I was younger.. I only wish I'd gone further learning formal computer programming instead of mechanical engineering and drafting ... but I dont regret the great opportunities Bentley products have given me over the last 20+ years ... again it would be nice as an academic exercise to do more with VBA but the linear vba you provided as a start for Stefan modified version has made it functional and provided an alternative solution for the original poster...
And to Stefan a big thank you and great job...
can you give examples please frank as I work with a surveyor and he might find this vba useful...