Fresh off racking my brain over GetPoint
, I’m right into another obstacle.
I need to run a horizontal ordinate dimension in a SWX drawing, and it needs to measure to the center of slots which are composed of 4 Edges
, two semicircles facing each other and two straight lengths connecting. The slots might be oriented in any direction.
It’s easy enough to compute the center point in Sheet
space, but my trouble is, what do I select so that the ordinate measures to and calculates from the proper point?
As far as I can tell, simply selecting one semicircle or one straight length does not clue SWX in to get the slot center. Selecting all 4 members just returns 4 ordinate measurements. And if I’m understanding it correctly, creating and selecting a centered SketchPoint by API within the drawing doc doesn’t work, because the SketchPoint doesn’t have any true model measurement info to pass to the ordinate: it’s just sheet coords.
Any tips?
I ended up solving this using SketchPoint
s. I was failing intially because I was trying to create the points in Sheet space. By getting the slot center in model space, and then using ModelToViewTransform followed by ModelToSketchTransform, I could select the sketch points and get correct dimensions.
1 Like
@liuning I can insert and select a centermark, but I am not having success getting the centermark added to the ordinate…