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.
Talking to myself again...
With further testing, I have determined that the Rotate cell code apparently cannot handle the fact that the cell requiring rotation shares one point on the figure that it is supposed to rotate too. This is true with the delivered SmartObjects Rotate Cell Code and our locally customized version. As it tries to find the nearest projection point, it eventually finds the smallest projected distance point but when projected onto the line, they are the same point. So the angle to align is zero.
The code needs to determine the nearest segment and read its start and end and use that as the angle. Ideally, the code should be able to test is the point is one of the points on the nearest figure and then use that information to calculate the angle.
Where do I get help on fixing this? I have VBA Coding experience, but my skills are very rusty. And it seems to me this supplied code is defective.
Charles (Chuck) Rheault CADD Manager
MDOT State Highway Administration
Chuck,
Please keep us posted in this thread about cell rotation automation.
Take care,
Cliff