Cogo point insert from excel not removing previous inserted cogo points

I have two questions maybe some could explain why this sample graph throws a warning, and also why it inserts additional cogo points when run more than once.

  1. while using dynamo to do the same station offset task using a block, dynamo seems to track the number of objects inserted. if I remove or add a station offset value in the excel file, the object is removed or added to the drawing when the graph is run again. why doesn’t this happen with cogo points?
    the graph keeps inserting more points every time the graph is run.

  2. The sample inserts the cogo points into the drawing at the correct location and layer, but it throws a warning einvalidinput ? could not find reason seeing it’s inserting the pointCogoPoints by station offset-from-excel.xlsx (10.0 KB)
    CogoPoints by station offset-from-excel.dyn (58.2 KB)

Thank you

It is inserting the COGO points, but the layer actually isn’t correct. If you check the layer for each COGO point they are actually inserted on layer 0. This is because the string for the layer name includes quotation marks, which is invalid for a layer name and hence the eInvalidInput error.

So just remove the quotation marks and it will work! If the layer name was in a Code Block instead of a String node, then the quotation marks would need to stay.

The above change to the layer name should fix this problem as well.

1 Like


Thanks, I looked at this for an hour or more and couldn’t find the error. I check help and some other places with no luck. and it did fix the object tracking!

Still very new to this, looking to find ways to use it in our dwg production.

Thank you


One other question if you have time. To take this one more step I added point style and point label style, but the style don’t update the points in the dwg. The graph doesn’t throw an error, and the node list shows the correctly for point style and point label styles from excel.

Any hits are welcome.

Thank you,CogoPoints by station offset-AND-STYLES-from-excel.dwg (1.0 MB)
CogoPoints by station offset-AND-STYLES-from-excel.xlsx (10.2 KB)
CogoPoints by station offset-AND-STYLES-from-excel.dyn (89.1 KB)