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: 

Drawing View via iLogic or VBA

1 REPLY 1
Reply
Message 1 of 2
Anonymous
302 Views, 1 Reply

Drawing View via iLogic or VBA

Is there a way to align a view with a plane.  So I have a plane "Detail 1" that is 45 Degrees to XY Plane.  I would like the iLogic to change the Base View in the Sheet to "Look at" "Detail 1" instead of the standard view enumerators.  I can't seem to find the code to do this.  This is because "Detail 1" will not always be 45 Degrees to XY Plane but it could vary.  Anyone have an idea?

 

1 REPLY 1
Message 2 of 2
matthew.greenDLCDJ
in reply to: Anonymous

I think I finally got something to work.  Its based off the camera.

Dim cam As Camera
cam = ActiveSheet.View("VIEW4").View.Camera

ang = 180

x = 10000 * Cos(ang / 360 * (2 * PI))
Z = 10000 * Sin(ang / 360 * (2 * PI))

cam.Eye = ThisApplication.TransientGeometry.CreatePoint(x, 0, Z)
cam.UpVector = ThisApplication.TransientGeometry.CreateUnitVector(0, 1, 0)
cam.ApplyWithoutTransition

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

Post to forums  

Autodesk Design & Make Report