I'm working on making views based on equipments. I have a difficulty on how to get the fenceCenterOrCornerOne Point for detail view based on specific location in an equipment.
I have the location of part of the equipment to be viewed but its location from the model. I'd tried to use the said location for me to get the desired view but the generated view not the expected view.
Does anyone have an idea that could help me to solve this problem?
I've attached sample sheet for additional reference on my problem.
On the left is the base view of the equipment then views on the right are my expected views.
Hope someone would share their ideas.
Thanks in advance.
I am afraid this is a late answer, but if it's not helpful for you it may be helpful for others.
The method ModelToSheetSpace allows you to find in your drawing the position of a point in your model, and the you can easily move the detailFence to that point, or to a point you can relate to that position.
I attach a piece of the code I have used for a similar situation. In my case I find the position of the model origin in the view and then position the fence from them taking into acount the ViewScale.
SyntaxEditor Code Snippet
Dim oDrawingView As DrawingView Dim oDetailDrawingView As DetailDrawingView Dim dX As Double Dim dY As Double Dim oViewOrigin As Point2d Dim oTG As TransientGeometry oDrawingView = ThisDrawing.Sheet("Sheet:1").View("B1").View oTG = ThisApplication.TransientGeometry oDetailDrawingView = ThisDrawing.Sheet("Sheet:1").View("D1").View dX=Parameter("Part.ipt.HoleDepth9") * oDrawingView.Scale / 10 'informed in cm dY=Parameter("Part.ipt.BC9")/2 * oDrawingView.Scale / 10 'informed in cm 'The origin in the DetailView is found using ModelToSheetSpace(<left blank means 0,0,0>) oViewOrigin= oDrawingView.ModelToSheetSpace(oTG.CreatePoint()) oDetailDrawingView.FenceCenter = oTG.CreatePoint2d(oViewOrigin.X + dX , oViewOrigin.Y + dY)