Simple Conversion - VBA To Vb.Net

Simple Conversion - VBA To Vb.Net

isocam
Collaborator Collaborator
244 Views
1 Reply
Message 1 of 2

Simple Conversion - VBA To Vb.Net

isocam
Collaborator
Collaborator

Can anybody help?

 

I have the following Inventor VBA script that exports a sheet metal part to a "flat pattern" dwg file. It works great!!

 

Dim oDataIO As DataIO

Set oDataIO = oDoc.ComponentDefinition.DataIO

Dim sOut As String

sOut = "FLAT PATTERN DWG?AcadVersion=2000&OuterProfileLayer=Outer"

oDataIO.WriteDataToFile sOut, DwgFileName

 

Can anybody tell me if the above code needs to be converted to work using a Vb.Net AddIn?

 

Many thanks in advance!

 

Darren

0 Likes
245 Views
1 Reply
Reply (1)
Message 2 of 2

Dev_rim
Advocate
Advocate

Hello there,

Yes you have to change a couple things. Parameters of functions should be written between "()" at VB.net

Here you go 

 

Dim oDataIO As DataIO
oDataIO = oDoc.ComponentDefinition.DataIO
Dim sOut As String
sOut = "FLAT PATTERN DWG?AcadVersion=2000&OuterProfileLayer=Outer"
oDataIO.WriteDataToFile(sOut, DwgFileName)

 

Regards

Devrim

If my answer is solved your problem, please mark it as Solution

Freundliche Grüße / Kind Regards
0 Likes