SyntaxEditor Code Snippet
Dim oSSet As SelectSet = ThisDoc.Document.SelectSet
If oSSet.count = 0 Then
MessageBox.Show("You must select a drawing view first", "iLogic")
Exit Sub
End If
'Reference to the drawing view from the 1st selected object
Dim oView As DrawingView = trycast(oSSet.item(1), DrawingView)
If oView IsNot Nothing Then
Dim osheet, oNewSheet As Sheet
osheet = oView.Parent
Dim oDoc As DrawingDocument
oDoc = osheet.Parent
' Wrapping activities in a transaction so the
' entire process can be undone with a single undo operation.
Dim trans As Transaction
trans = ThisApplication.TransactionManager.StartTransaction(oDoc, "Move First View")
'add a new sheet and copy all drawing views there
oNewSheet = oDoc.Sheets.Add
Call oView.MoveTo(oNewSheet)
For Each oOtherView In osheet.DrawingViews
Call oOtherView.MoveTo(oNewSheet)
Next
'Copy back the views to original sheet and delete the new sheet created
For Each oOtherView In oNewSheet.DrawingViews
Call oOtherView.MoveTo(osheet)
Next
Call oNewSheet.Delete
Call osheet.Update
trans.End
Else
MessageBox.Show("The selected object is not a drawing view", "iLogic")
End If
use the above ilogic rule. It will solve your issue.
If you found this useful. Please Accept this as solution