Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
JelteDeJong
in reply to: NachitoMax

this iLogic rule uses the first DrawingView on the sheet to create the back view (and rightview but that will be deleted automaticaly.)

Dim doc As DrawingDocument = ThisApplication.ActiveDocument
Dim oSheet As Sheet = doc.ActiveSheet


Dim baseView As DrawingView = oSheet.DrawingViews.Item(1)
Dim oTG As TransientGeometry = ThisApplication.TransientGeometry

Dim baseViewPosition As Point2d = baseView.Position
Dim BaseViewWidth As Double = baseView.Width
Dim rightViewPosition As Point2d = oTG.CreatePoint2d(baseViewPosition.X + 1 + BaseViewWidth / 2, baseViewPosition.Y)
Dim backViewPosition As Point2d = oTG.CreatePoint2d(baseViewPosition.X + 1 + BaseViewWidth, baseViewPosition.Y)
Dim drawingViewStyle As DrawingViewStyleEnum = DrawingViewStyleEnum.kFromBaseDrawingViewStyle

Dim rightView As DrawingView = oSheet.DrawingViews.AddProjectedView(baseView, rightViewPosition, drawingViewStyle)
Dim backView As DrawingView = oSheet.DrawingViews.AddProjectedView(rightView, backViewPosition, drawingViewStyle)

'the right view was created to create the back view but is not what you asked for, therfor it can be deleted
rightView.Delete()

' this line is not mandatory but make makes sure that the views stay aligned
backView.Align(baseView, DrawingViewAlignmentEnum.kHorizontalViewAlignment)

 

Jelte de Jong
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


Blog: hjalte.nl - github.com