Message 1 of 4
VB.Net addin save dxf problem

Not applicable
09-11-2010
10:42 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
I'm new to programming in VB.Net and trying to create an addin for inventor 2010 to auto save sheetmetal flat patterns as dxf,
after searching through old posts and reading the blog by Brian Eakins I have come up with the following code.
The message boxes are there for debugging, and only seem to work as far as the first one.
Private Sub m_appEvents_OnSaveDocument(ByVal DocumentObject As Inventor._Document, ByVal BeforeOrAfter As Inventor.EventTimingEnum, ByVal Context As Inventor.NameValueMap, ByRef HandlingCode As Inventor.HandlingCodeEnum) Handles m_appEvents.OnSaveDocument
'starting my code here////////////////////////////////////////////////////////
If DocumentObject.SubType = "{9C464203-9BAE-11D3-8BAD-0060B0CE6BB4}" Then
Dim invSheetMetalDoc As Inventor.PartDocument = CType(DocumentObject, Inventor.SheetMetalComponentDefinition)
'MsgBox("test msg for debuging.", MsgBoxStyle.Information And MsgBoxStyle.OkOnly)
' if the flat exists.
If invSheetMetalDoc.FlatPattern Then
MsgBox("test msg for debuging.", MsgBoxStyle.Information And MsgBoxStyle.OkOnly)
' Get the flat pattern.
'Dim invFlatPattern As FlatPattern
'invFlatPattern = invSheetMetalDoc.FlatPattern
';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
'dxf code
Dim Dxf_Lasercut_dir As String
Any idea on how to get this to work? What am I missing.
Mark Yankey