Hello
Here is a really strange one.
i create pipeline with code like this:
Set oConeElm(0) = CreateConeElement2(Nothing, 1, oPoint(0), oPoint(1)) Set oConeElm(1) = CreateConeElement2(Nothing, 1.1, oPoint(0), oPoint(1)) Set oSolidEnum = SmartSolid.ConvertToSmartSolidElement(oConeElm(0)) While oSolidEnum.MoveNext Set oSolidElm(1) = oSolidEnum.Current Wend Set oSolidEnum = SmartSolid.ConvertToSmartSolidElement(oConeElm(1)) While oSolidEnum.MoveNext Set oSolidElm(2) = oSolidEnum.Current Wend Set oSolidElm(0) = SmartSolid.SolidSubtract(oSolidElm(2), oSolidElm(1)) ActiveModelReference.AddElement oSolidElm(0) oSolidElm(0).Redraw oSolidElm(0).Rewrite
So its easy, basic pipe from one point to the next. And it works fine. Until i invoke anything from inRail for example load dtm into surfaces. anything.
repeating this code throws the pipe far away in coordinates.
I tried to debug it by all means. i dag through activesettings watch. finally i measured the distance by the pipe is thrown away and it was roughly times 429.
Again i ran through all the settings and stumbled upon Settings -> Design File -> Working Units -> Advanced Settings, there it was in Solids Area. when i changed it to 1 everything went back to normal.
Here is a flick that shows exactly whats going on:
[View:https://youtu.be/ERHAbfzJPXI:940:0]
I red the description of that setting and it shouldn't be related to this and it only happens in the relation with inRail. I don't feel very competent to call it a bug, but it looks like so.
the next solution i tried to apply was finding the setting in VBA responsible for this Solids Area,but simply cannot find it.
I did record it and got a hazy code which doesn't work when replayed.
The closest topic I found on this forum is:
https://communities.bentley.com/products/microstation/f/273/p/89197/253701
but it didn't solve the issue.
I need to find a setting to set it to 1 at the start of the code and set it back to its original value at the end. Preferably without recording (it doesnt work anyway and it also creates a little popup of settings). Or maybe some other way to avoid this solid misplacement. To avoid misunderstanding - I dag through help, F2 - methods, settings, watches, debugging etc so i really don't need a lecture on basics. to anyone who can help - thank you in advance.