Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Detail View

1 REPLY 1
Reply
Message 1 of 2
jac10
268 Views, 1 Reply

Detail View

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.

1 REPLY 1
Message 2 of 2
RodrigoEiras
in reply to: jac10

 

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)

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report