Is it possible to control the rotate/absolute angle option with iLogi ?
If yes, how ?
I'm new to iLogic and coding i general.
Is it possible to control the rotate/absolute angle option with iLogi ?
If yes, how ?
I'm new to iLogic and coding i general.
This may solve your issue,
https://forums.autodesk.com/t5/inventor-forum/rotate-a-drawing-view-using-ilogic/td-p/4327575
This may solve your issue,
https://forums.autodesk.com/t5/inventor-forum/rotate-a-drawing-view-using-ilogic/td-p/4327575
Hi @pklWNF89 .
Just so you know, the method used in the example that @bhavik4244 pointed out is the main method exposed for use in iLogic, for rotating a drawing view. If you are confused by the math being used within it, that is because in iLogic, when you supply a general number (without units specifier) that is to be understood as a measurement, iLogic understands its units to be in 'database' units for that type of measurement, instead of whatever units you may currently be using within your active document. The database units for angle measurements is Radians, and the user in that example was wanting to specify the angle in Degrees units, so he is using math to convert 45 degrees to Radians units, so that the iLogic method will understand it correctly.
Wesley Crihfield
(Not an Autodesk Employee)
Hi @pklWNF89 .
Just so you know, the method used in the example that @bhavik4244 pointed out is the main method exposed for use in iLogic, for rotating a drawing view. If you are confused by the math being used within it, that is because in iLogic, when you supply a general number (without units specifier) that is to be understood as a measurement, iLogic understands its units to be in 'database' units for that type of measurement, instead of whatever units you may currently be using within your active document. The database units for angle measurements is Radians, and the user in that example was wanting to specify the angle in Degrees units, so he is using math to convert 45 degrees to Radians units, so that the iLogic method will understand it correctly.
Wesley Crihfield
(Not an Autodesk Employee)
You can set an absolute rotation of a drawing view with the code snippet below. Positive angles are counterclockwise, and negative angles are clockwise. Keep in mind that although the angle is "absolute," it is still dependent on the initial orientation of the view cube and can thus differ in 90° increments.
Dim oView As DrawingView = ThisApplication.CommandManager.Pick(SelectionFilterEnum.kDrawingViewFilter, "Select View")
If oView is Nothing Then Return
Dim Angle As Double = 30
oView.Rotation = Angle*(PI/180)
You can set an absolute rotation of a drawing view with the code snippet below. Positive angles are counterclockwise, and negative angles are clockwise. Keep in mind that although the angle is "absolute," it is still dependent on the initial orientation of the view cube and can thus differ in 90° increments.
Dim oView As DrawingView = ThisApplication.CommandManager.Pick(SelectionFilterEnum.kDrawingViewFilter, "Select View")
If oView is Nothing Then Return
Dim Angle As Double = 30
oView.Rotation = Angle*(PI/180)
Can't find what you're looking for? Ask the community or share your knowledge.