IS NOT VAULTED & FILE IS READ ONLY

IS NOT VAULTED & FILE IS READ ONLY

RoyWickrama_RWEI
Advisor Advisor
750 Views
4 Replies
Message 1 of 5

IS NOT VAULTED & FILE IS READ ONLY

RoyWickrama_RWEI
Advisor
Advisor

In my iLogic endeavors, I some times need to retrieve the following information releted to the current active document.

I appreciate some one replying me with a sample code. Thanks.

 

 

2020-04-18 09_52_38-Window.png

0 Likes
Accepted solutions (1)
751 Views
4 Replies
Replies (4)
Message 2 of 5

johnsonshiue
Community Manager
Community Manager

Hi! Let me move this message to Inventor Customization forum.

Many thanks!



Johnson Shiue (johnson.shiue@autodesk.com)
Software Test Engineer
Message 3 of 5

RoyWickrama_RWEI
Advisor
Advisor

Thanks for the good work.

I will take care next time!

 

0 Likes
Message 4 of 5

WCrihfield
Mentor
Mentor
Accepted solution

Not sure about the "Vaulted" part, because I'm not currently using Vault, but I think I can help you out with the ReadOnly status.  The following code can determine if the file is ReadOnly or not.

Dim oDoc As Document = ThisApplication.ActiveDocument
Dim oFI As New System.IO.FileInfo(oDoc.FullFileName)
If oFI.IsReadOnly = True Then
	MsgBox("This file is ReadOnly.", vbOKOnly, "READ-ONLY")
End If

There is also the "IsModifiable" boolean you can check too.

If oDoc.IsModifiable = False Then

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

Message 5 of 5

RoyWickrama_RWEI
Advisor
Advisor

Thanks a lot. Great help.

0 Likes