Can I run ilogic rule when I check in to the vault?

Can I run ilogic rule when I check in to the vault?

skseo
Contributor Contributor
358 Views
6 Replies
Message 1 of 7

Can I run ilogic rule when I check in to the vault?

skseo
Contributor
Contributor

 

I want to run the iLogic rule when I check in the file in Vault.
Is there a way?

0 Likes
359 Views
6 Replies
Replies (6)
Message 2 of 7

bradeneuropeArthur
Mentor
Mentor

For what version of Vault?

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

0 Likes
Message 3 of 7

skseo
Contributor
Contributor
It's 2022 version.
0 Likes
Message 4 of 7

bradeneuropeArthur
Mentor
Mentor

Basic

Professional 

Or 

Workgroup

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

0 Likes
Message 5 of 7

skseo
Contributor
Contributor
Professional
0 Likes
Message 6 of 7

bradeneuropeArthur
Mentor
Mentor
Can you share the rule?

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

0 Likes
Message 7 of 7

skseo
Contributor
Contributor

I want to run the code when I press the Vault check-in button.

 

doc = ThisDoc.Document
docName = ThisDoc.Document.FullFileName
newDocpath = docName.Split("작업공간")(0)
newDocpath = newDocpath + "작업공간\구매팀출도"

PartREV = doc.ReferencedDocuments.Item(1).PropertySets.Item("Inventor Summary Information").Item(7).Value


Dim Time As DateTime = Date.Now
Dim Format As String = "yyyyMd"
todayDate = Time.ToString(Format)

docDN = doc.DisplayName
docDN = docDN.Split(".dwg")(0)

If PartREV = ","
	convertdwgName = docDN + "_" + todayDate + "(Cad).dwg"
	convertpdfName = docDN + "_" + todayDate + ".pdf"


ElseIf PartREV = ""
	convertdwgName = docDN + "_"  + todayDate + "(Cad).dwg"
	convertpdfName = docDN + "_"  + todayDate + ".pdf"

Else
	convertdwgName = docDN + PartREV + "(Cad).dwg"
	convertpdfName = docDN + PartREV + ".pdf"

End If





Dim oFolder As String
oFolder = newDocpath
If System.IO.Directory.Exists(oFolder) = False Then
	System.IO.Directory.CreateDirectory(oFolder)
ElseIf System.IO.Directory.Exists(oFolder) = True Then
	'What to do with it if it does exist here.
End If


'----------------------------------------------------------------
'Get the DWG translator Add-In.
Dim DWGAddIn As TranslatorAddIn
DWGAddIn = ThisApplication.ApplicationAddIns.ItemById("{C24E3AC2-122E-11D5-8E91-0010B541CD80}")
'Set a reference to the active document (the document to be published).
Dim oDocument As Document
oDocument = ThisApplication.ActiveDocument
Dim oContext As TranslationContext
oContext = ThisApplication.TransientObjects.CreateTranslationContext
oContext.Type = kFileBrowseIOMechanism


' Create a NameValueMap object
Dim oOptions As NameValueMap
oOptions = ThisApplication.TransientObjects.CreateNameValueMap


' Create a DataMedium object
Dim oDataMedium As DataMedium
oDataMedium = ThisApplication.TransientObjects.CreateDataMedium


' Check whether the translator has 'SaveCopyAs' options
If DWGAddIn.HasSaveCopyAsOptions(oDocument, oContext, oOptions) Then


	Dim strIniFile As String
	strIniFile = "E:\Inventor\00. YMK Template\Inventor 설정 파일\CAD 변환\CAD 파일 구성저장1.ini"


	' Create the name-value that specifies the ini file to use.
	oOptions.Value("Export_Acad_IniFile") = strIniFile


End If
'Set the destination file name


oDataMedium.FileName = newDocpath + "\" + convertdwgName


'Publish document.
Call DWGAddIn.SaveCopyAs(oDocument, oContext, oOptions, oDataMedium)

'-----------------------------------------------------------------------------------------

Dim oPrintMgr As DrawingPrintManager
oPrintMgr = ThisApplication.ActiveDocument.PrintManager


oPrintMgr.Printer = "Microsoft Print to PDF"


' Set to print in color.
oPrintMgr.AllColorsAsBlack = True

' Set to print two copies.
oPrintMgr.NumberOfCopies = 1

' Set to print using portrait orientation.
oPrintMgr.Orientation = kLandscapeOrientation

' Set the paper size.
oPrintMgr.PaperSize = kPaperSizeA3

' Set to print all sheets.
oPrintMgr.PrintRange = kPrintSheetRange

' Set to print full scale.
oPrintMgr.ScaleMode = kPrintBestFitScale

' Submit the print.
oPrintMgr.PrintToFile(newDocpath + "\" + convertpdfName)

'------------------------------------------------------------------------------------

doc.ReferencedOLEFileDescriptors.Add(newDocpath + "\" + convertdwgName, OLEDocumentTypeEnum.kOLEDocumentLinkObject)
doc.ReferencedOLEFileDescriptors.Add(newDocpath + "\" + convertpdfName, OLEDocumentTypeEnum.kOLEDocumentLinkObject)
0 Likes