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

VBA code - Step export from idw

Anonymous

VBA code - Step export from idw

Anonymous
Not applicable

Hi All,

 

 I need the code that would open ipt or idw from first sheet first view and generate step file from it.

Then after export switch bacjk to idw as active document.

 

Also I am using code t update part:

Dim oDocument As Document
Set oDocument = ThisApplication.ActiveDocument

oDocument.Update

 But this code do not update idw - all sheets

 

Any help woul be great.

 

Regards

 

0 Likes
Reply
Accepted solutions (1)
741 Views
2 Replies
Replies (2)

Anonymous
Not applicable

Hi All

I have found this code:

'Update Drawing

Dim oDocument As Inventor.DrawingDocument
Set oDocument = ThisApplication.ActiveDocument
Dim oSheet As Inventor.Sheet
oSheet = oDocument.Sheets(1)
If oDocument.RequiresUpdate Then
oDocument.Update
oDocument.Save
End Sub

 But It fails at:

oSheet = oDocument.Sheets(1)

 Invalid use of property.

 

Thanks

0 Likes

Anonymous
Not applicable
Accepted solution

Because this property is an object. Therefore, in vba, you must use "Set" keyword.

 

Set oSheet =  oDocument.Sheets(1)

0 Likes