Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
SandmanINV
304 Views, 2 Replies

Copy All data from sheet to another sheet

Hi, 

Maybe my question sound stupid, but that is what i need, and I hope someone can help me with ilogic or vb.net.

My situation is, I have sheet1 with border, titleblock, views, note... with size is A4.

Now, I want copy all thing from sheet1 to sheet BUT size is A3. Just copy all of sheet1, ignore size between them.

How should I do ? Thank you.

 

AdamAG99T
in reply to: SandmanINV

The most straightforward way I can think of to do this would be to copy the entire sheet to another empty drawing file and then copy it back to the drawing you want it in. Once you do that just simply change the sheet size. Unfortunately inventor wont allow you to simply copy a sheet within a drawing so you need to use another drawing as a workaround.

forbillian
in reply to: AdamAG99T

Thats correct @AdamAG99T  & @SandmanINV .  Here's an example I use:

 

Sub Main IDW_DuplicateSheet()

Dim oDoc As DrawingDocument
 oDoc = ThisApplication.ActiveDocument

Dim tmpDoc As DrawingDocument
 tmpDoc = ThisApplication.Documents.Add(kDrawingDocumentObject, , True)


Dim newSheet As Sheet
 newSheet = oDoc.ActiveSheet.CopyTo(tmpDoc)

Call newSheet.CopyTo(oDoc)

tmpDoc.Close (True)

End Sub