[ORD 2019 R3] Survey Point Rotating to Linear Segments via SmartObjects VBA - Inconsistent Results

We are using a customized version of the SmartObjects VBA Project and it is working as expected for some features but not others. The tool cannot rotate cells upon initial import as the lines are not created until all the points are displayed. So the project requires a manual redraw of the survey fieldbook before the cells will rotate. 

We are using it for two types of cells. The ones that work are pavement marking symbols, like turn arrows and word appliques (ONLY, LEFT, SCHOOL, etc.). The only caveat is that sometimes the direction of the nearby lines (road striping) results in the symbol being out by 180 degrees. The ones that are not working are our Guy Wire Anchor Cells. These are usually draw using a JPT code, unlike the road striping. Since that seems to be the only difference between the two, I wonder if the rotate code just cannot work on JPT lines. Of if the fact that the segment shares a coincident point with the cell is the problem.

I welcome any suggestions.

BYW, this is a sort of update to an older thread, but it is a newer version and more information. If anyone has managed to get a Guy Anchor cell to rotate, I would love to find out how.

Parents
  • I revisited our code. It seemed like the easiest solution was to make two different cell rotation macros. The delivered version is great for aligning to nearby linear elements. The new one I created is expressly for aligning cells with a linear element that shares a common point.

    Once I've cleaned it up I will see about sharing it. It will end up in our CAD Standards. but the web versions are always behind the PW Managed Workspace and internal versions.


    Charles (Chuck) Rheault
    CADD Manager

    MDOT State Highway Administration

    • MicroStation user since IGDS, InRoads user since TDP.
    • AutoCAD, Land Desktop and Civil 3D, off and on since 1996
  • Hi Chuck,

    I'm currently wrestling with these different scenarios. Rotating pavement markings, guy wire cells, signs, light fixtures, gate posts, etc. It looks like we were able to rotate some cells to linear elements in the file by modifying the SmartObjects macro. Would you be up to sharing the code that you have created? Maybe we could massage it to work with our cells. I do have some code that allows the rotation of a cell to another cell and it works fine as long as there are not other same named cells within the search area, it gets confused and is not reliable. Bentley removed the JNC code that allowed us to join one point to another and this would rotate a cell in the file to its mate cell. I know this may sound rather confusing to others who have not tried to resolve these issues but figured you might understand since you have a lot of history with this.

  • Here is the ORD version of Smart Objects. It still contains all of the regular modules. Our code is all found in the SHA0201 module. They are documented in a manner very similar to the delivered code, with examples in the initial comments. The regular modules may not be the most recent Bentley versions. Since we were using our own code, we never worried about updating their code.

    Key Features: We pass Element Templates to the procedure for it to use for any graphics it creates. WE have a lot of label tools. We created these before Survey had its own labeling capabilities. While we have stopped using some of these labels, others include error checking that is unavailable using the survey labels.

    We hope to be making our ORD Workspace available soon, but we still have a lot of work to do and do not want to stop those efforts while assembling all the things we need to publish that workspace. However, our V8i Workspace does have the Open Roads Survey DGNLIB's and a version of this VBA Project. So there are files that can be reviewed with our Alpha Code list, attributes, etc. which are all part of t his process.

    /cfs-file/__key/communityserver-discussions-components-files/5922/SmartObjectsSHA.mvba


    Charles (Chuck) Rheault
    CADD Manager

    MDOT State Highway Administration

    • MicroStation user since IGDS, InRoads user since TDP.
    • AutoCAD, Land Desktop and Civil 3D, off and on since 1996
  • Thank you very much for this. Did you ever find a use for the RotateLineList.txt file that comes with the SmartObjects.mvba macro? I'm about to start testing it now. Again, thank you.

  • While watching this thread, I'm so happy you can just open the dgn and rotate survey cells in the newer versions of ORD.

  • It is nice to be able to manually rotate cells. The purpose of the macro is to rotate all of the cells automatically after a large import of survey data from a data collector. It saves the time of doing this manually to as many as 100 cells depending on the amount of points collected by our survey team.

  • Since I've never used these macros, what is the process? Is it cumbersome? Is it done in the field?

    I just surveyed a 2.4 mile urban stretch (no alignments given).  It has about 20000 points and I'll be rotating approximately 100+ cells.  I'll be done in an hour maybe 2 at the most.  Is your total time to do how you do it less than that?

Reply Children
  • After the survey data is imported. You Redraw the graphics from the Survey workflow. It takes a second and its's done. It's worth it for us to not have to do this task manually.

  • I guess I'd have to see it in action and know the workflow to see if it was worth it.  So nothing has to be done in the field? No extra coding at all?

  • So the three cells in the pic, a sign, a cantilever, and an inlet, just rotate according to what? I'm assuming the macros that are created access the survey code (I don't know that though, I don't know what goes on with the workflow).  But how do they know what to base their rotation off of?  That sign could be one of two ways for either traffic direction.

  • I can't speak to the logic in the macro that Bentley provides, but the rotation is based on the imported linework. Each point cell that is imported is placed at its rotation as it has been created in your cell library by default. Once the data is imported through the Survey workflow into a field book, ORD attaches a vba macro rotation string to each of the point cells you identify in your Survey Settings. Once all of the graphics are present, you intitiate a "Redraw" from the Survey workflow. The software applies the rotation to the cell based off of whatever linear feature you define. If you have a linear feature like EO for edge of pavement, the cell is rotated to that linear feature.

    The smartobjects.mvba macro needs to be loaded into your file through the VBA Manager. If you set it to load on startup, you never have to repeat this step again.

    The following images show the code that is applied to each point cell. I've highlighted an SBIKE pavement marking cell as a specific example. Generally, the survey crew knows which direction to take their shots in the field and keep that consistent so that the line to rotate the cell to is consistent.

    The code calls out: Survey,Annotate,RotateCell,25,EO,GLIP,0

    Survey.Annotate,RotateCell is the call for the function within the MVBA.

    25 is the distance in feet to search.

    EO and GLIP are the linear elements we search for. (We updated the Bentley macro to include 2 elements to search for because sometimes one is not present).

    0 indicates the angle to rotate to relative to the line that the macro found.

    This is the "Redraw" tool you press that applies the code to all the points that were identified during the import process.