Message 1 of 3
Not applicable
11-08-2019
01:00 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I write my code in visual studio then copy and paste it into an ilogic rule. I typically have some cleanup to do on the code once it's in ilogic. For instance ilogic doesn't accept regions and other things. So I started looking for ways where I can paste without cleanup. I can across the ilogic rule setting "Straight VB code". I can't get it working and the documentation written about it doesn't make sense. Can you explain why my code doesn't work?
Imports System
Imports System.Type
Imports System.Activator
Imports SysInter = System.Runtime.InteropServices
Imports System.IO
Imports Inv = Inventor
Module Module1
'By:
'Date: 10/11/19
Public Sub Main()
MsgBox("Main")
GetDoc()
End Sub
'=\/==\/==\/==\/==\/==\/==\/==\/==\/==\/==\/==\/==\/==\/==\/==\/==\/==\/==\/==\/==\/==\/==\/==\/==\/==\/==\/==\/==\/==\/==\/==\/==\/=
#Region "Some Sub to Test"
Public Sub GetDoc()
If ThisDoc.Document.Type = Inv.DocumentTypeEnum.kAssemblyDocumentObject Then
MsgBox("Document is an Assembly.")
Else If ThisDoc.Document.Type = Inv.DocumentTypeEnum.kDrawingDocumentObject Then
MsgBox("Document is an Drawing.")
Else If ThisDoc.Document.Type = Inv.DocumentTypeEnum.kPartDocumentObject Then
MsgBox("Document is an Drawing.")
Else
MsgBox("Not a typical document type.")
End If
End Sub
#End Region
End Module
Solved! Go to Solution.