Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
Curtis_Waguespack
in reply to: phlyx

Hi @phlyx 

 

This question would have been better placed on the  Inventor Customization forum so I've asked the moderators to move it to there, please keep that in mind for the future
http://forums.autodesk.com/t5/Autodesk-Inventor-Customization/bd-p/120

 

as for your question though, here is an example I had on hand.

 

I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com

 

strPath =  System.IO.Directory.GetParent(ThisDoc.Document.FullFileName).FullName


'set read only off for each file in the folder
Dim dir As New System.IO.DirectoryInfo(strPath)
 For Each File As System.IO.FileInfo In dir.GetFiles("*", System.IO.SearchOption.AllDirectories)
     ' Set flag.
     File.IsReadOnly = False
 Next
	 
MessageBox.Show("Read Only turned off for all files in: "  &vbLf &vbLf & _
strPath, "iLogic", MessageBoxButtons.OK, MessageBoxIcon.Information)