I am trying to retrieve the location - start and end points - and preferably the Range of just the Text part of a dimension in Draft:
objDim.GetKeyPoint(1, x, y, z, SolidEdgeFramework.KeyPointType.igKeyPointCenter, 1)
I tried the first argument index with values 1 and 0 and the last argument HandleType also 1 and 0 with no knowledge about what they actually mean. Also tried out various KeyPointTypes but could get any close.
What would be the Index or Keypoint values to be used to retrieve the text position ?
Is GetKeyPoint even the correct function to use for getting the text location?
Any help is highly appreciated.
Solved! Go to Solution.
you may use Dimension.Range(...) to get returned the coordinates for xmin, ymin, xmax, ymax of the Dimension object in total (surrounding virtual box).
Dimension.GetKeyPoint(...) sounds a bit confusing. This method returns the values for the specified keypoint index given as first argument.
Dimension.KeyPointCount gives you the count of available keypoints. In a loop over all indices available (0 to KeyPointCount -1) you can get so the information for all keypoints. The return values for KeyPointType and HandleType let you identify the keypoints.
The API help to this method also does contain an usefull example.
Wolfgang, can you please share the link to the API help. Local CHM help from the SDK folder does not have an example for GetTextAtIndex.
there is also a link to the online version of the API help from the Solid Edge Developer Community home page. But still only for ST7 and not for ST8
By this method only the Location of the Dimension text is retrieved but how to set the location of the dimension text?
My problem is I have created a drawing with all the dimension placed at required distance. As the Size of the Model increases, I change the scale appropriately and also the dimension text scale. But while doing so some of the dimensions are getting overlapped in the view. I tried to set the track distance but track distance is not changing consistently as per the change in scale so I can't predict the track distance.
is there any better way to handle this please let me know.