[ORD 2021 R1] C# editing template drop start and stop stations issues

I'm using the Bentley.CifNET.GeometryModel.SDK.Edit.TemplateDropEdit object to change a template drop station range.

The function I use is 

editTD.SetDistanceDefinition(metricDist, metricEndDist) with the input being the distance to the stop and start stations in metric.

graphically it does what I want.  However there are some other odd things that happen.

If I hover over the c# updated template drop in the 2d view the tool tip gives me the right station range.

If I click on the c# updated template drop to edit the station range it does not show the stations but gives me the distances instead.  The distance also has the foot symbol suffix added to it.  If I go to the bucket command to edit the corridor it also shows the distances (with the foot symbol suffix) for the c# updated template drop instead of the stations.

My program has a dialog box that shows the all the template drop station ranges for a corridor.  After editing a template drop using the above command and then showing by dialog box again, the edited template drop will display the start and ending station for the corridor alignment.  Thus the template drop functions StartDistance and EndDistance return 0 and the length of the alignment for the c# updated template drop.

There are some other template edit functions functions 

    StartDistanceDefinitionMethod

    EndDistanceDefinitionMethod

Which can be set to

    Calculated

    EntireElement

    GivenDistance

    GivenLength

You can only change it the end distance, start distance is read only.  Changing the end one did not make a difference.

Has anyone had success with the 

     SetDistanceDefinion 

Command?

Parents
  • Hi Henrique,

    The version I'm using is 10.10.01.03.  

    If I save the file it still shows the distances and getting the start/end distance via c# still gives me back 0 and the alignment length.  However, if I close and reopen the file, the file, the template drop station limits text fields still show distances but when I get the start/end distance via c#, it does give me the correct distances.

    Looks like "SetDistanceDefinition" function somehow causes the functions "StartDistance" and "End distance" to return values  that use the setting "EntireElement" for the "DistanceDefinitionMethod" assuming the element is the alignment while in the same drawing session.  And then saving and re-opening the file then calculate the distances correctly.

    For the template drop it seems like there is an internal setting for the station limit display; either stations or distances.  This setting is not exposed to the end user.  And so far I can't see this setting exposed via c#.

Reply
  • Hi Henrique,

    The version I'm using is 10.10.01.03.  

    If I save the file it still shows the distances and getting the start/end distance via c# still gives me back 0 and the alignment length.  However, if I close and reopen the file, the file, the template drop station limits text fields still show distances but when I get the start/end distance via c#, it does give me the correct distances.

    Looks like "SetDistanceDefinition" function somehow causes the functions "StartDistance" and "End distance" to return values  that use the setting "EntireElement" for the "DistanceDefinitionMethod" assuming the element is the alignment while in the same drawing session.  And then saving and re-opening the file then calculate the distances correctly.

    For the template drop it seems like there is an internal setting for the station limit display; either stations or distances.  This setting is not exposed to the end user.  And so far I can't see this setting exposed via c#.

Children