disable Vault check in using ilogic

disable Vault check in using ilogic

Anonymous
Not applicable
749 Views
5 Replies
Message 1 of 6

disable Vault check in using ilogic

Anonymous
Not applicable

Is it possible to disable the check in of files? i.e.

 

If Right(iProperties.Value("Project", "Part Number"),4)= "_MIR" Then "DISABLE CHECK IN"

Else 'do nothing

End If

 

As you can see from the line of code I would like to stop the repeat offenders from saving mirror parts without following the correct procedure.

Perhaps there are other ways of achieving a similar result like, disable save or some other function.

Can anybody help me please?

 

0 Likes
750 Views
5 Replies
Replies (5)
Message 2 of 6

MechMachineMan
Advisor
Advisor

Or you could add a message box to the the templates that activates on the On Save event (this is just a draft code, so there may be errors)

 

If iProperties("Summary", "Part Number").Value LIKE "*_MIR*"

        MsgBox("Part Number is invalid, " & ThisApplication.GeneralOptions.UserName() & "!" & vblf & vblf & "Current Part Number is: " & iProperties("Summary",                       _  "Part Number").Value,,"iProperty Enforcement")

End if

 

You can also pull the user name from the application using:

 


--------------------------------------
Did you find this reply helpful ? If so please use the 'Accept as Solution' or 'Like' button below.

Justin K
Inventor 2018.2.3, Build 227 | Excel 2013+ VBA
ERP/CAD Communication | Custom Scripting
Machine Design | Process Optimization


iLogic/Inventor API: Autodesk Online Help | API Shortcut In Google Chrome | iLogic API Documentation
Vb.Net/VBA Programming: MSDN | Stackoverflow | Excel Object Model
Inventor API/VBA/Vb.Net Learning Resources: Forum Thread

Sample Solutions:Debugging in iLogic ( and Batch PDF Export Sample ) | API HasSaveCopyAs Issues |
BOM Export & Column Reorder | Reorient Skewed Part | Add Internal Profile Dogbones |
Run iLogic From VBA | Batch File Renaming| Continuous Pick/Rename Objects

Local Help: %PUBLIC%\Documents\Autodesk\Inventor 2018\Local Help

Ideas: Dockable/Customizable Property Browser | Section Line API/Thread Feature in Assembly/PartsList API Static Cells | Fourth BOM Type
0 Likes
Message 3 of 6

Anonymous
Not applicable

Yeah I thought about a message box but the main offenders will simply ignore this, hence the search for a disabling feature. Or is the code you supplied over and above a simple message box?

0 Likes
Message 4 of 6

MechMachineMan
Advisor
Advisor
Nah, that is just a simple message box. You could also have a rule run that opens up a modal dialog box or an input box that asks them to fill in the part number at the time.

Or you could do logging, so it logs both the user and the file that that are saved.

--------------------------------------
Did you find this reply helpful ? If so please use the 'Accept as Solution' or 'Like' button below.

Justin K
Inventor 2018.2.3, Build 227 | Excel 2013+ VBA
ERP/CAD Communication | Custom Scripting
Machine Design | Process Optimization


iLogic/Inventor API: Autodesk Online Help | API Shortcut In Google Chrome | iLogic API Documentation
Vb.Net/VBA Programming: MSDN | Stackoverflow | Excel Object Model
Inventor API/VBA/Vb.Net Learning Resources: Forum Thread

Sample Solutions:Debugging in iLogic ( and Batch PDF Export Sample ) | API HasSaveCopyAs Issues |
BOM Export & Column Reorder | Reorient Skewed Part | Add Internal Profile Dogbones |
Run iLogic From VBA | Batch File Renaming| Continuous Pick/Rename Objects

Local Help: %PUBLIC%\Documents\Autodesk\Inventor 2018\Local Help

Ideas: Dockable/Customizable Property Browser | Section Line API/Thread Feature in Assembly/PartsList API Static Cells | Fourth BOM Type
0 Likes
Message 5 of 6

MechMachineMan
Advisor
Advisor

Or Just have the box in a while loop, so that is impossible for them to get past 😄

So:

While PartNumber contains _MIR
Show input box and ask for a new part number
Update Part Number
End while


--------------------------------------
Did you find this reply helpful ? If so please use the 'Accept as Solution' or 'Like' button below.

Justin K
Inventor 2018.2.3, Build 227 | Excel 2013+ VBA
ERP/CAD Communication | Custom Scripting
Machine Design | Process Optimization


iLogic/Inventor API: Autodesk Online Help | API Shortcut In Google Chrome | iLogic API Documentation
Vb.Net/VBA Programming: MSDN | Stackoverflow | Excel Object Model
Inventor API/VBA/Vb.Net Learning Resources: Forum Thread

Sample Solutions:Debugging in iLogic ( and Batch PDF Export Sample ) | API HasSaveCopyAs Issues |
BOM Export & Column Reorder | Reorient Skewed Part | Add Internal Profile Dogbones |
Run iLogic From VBA | Batch File Renaming| Continuous Pick/Rename Objects

Local Help: %PUBLIC%\Documents\Autodesk\Inventor 2018\Local Help

Ideas: Dockable/Customizable Property Browser | Section Line API/Thread Feature in Assembly/PartsList API Static Cells | Fourth BOM Type
0 Likes
Message 6 of 6

Anonymous
Not applicable

Yeah I imagine all this would be difficult to achieve while the operator is mirroring items.

The easiest way would obviously make them re-use items which don't require mirroring but they simply will not adhere to the rules. I have a boat load of copied/mirrored standard fasteners etc from the days prior to my content centre and as we use copy design old files regularly (too regularly in my opinion) people are just copying and mirroring everything.

I'll have to take a look when I return in the morning.

Maybe I should just get a big stick!

0 Likes