Go to CadSharp.com. It has lots of resources and tutorials to get you started. Also, the local API help is better (imho) than the online. In SolidWorks, go to Help->API Help.
Is this what you're looking for?
The documentation can be pretty hit or miss - I think that's part of the reason this API forum is relatively active. I've done a couple moderately sized projects with the API and there are plenty of times where I will hit a dead end in the API documentation when trying plan how to implement something.
Another decent resource is the macro recorder built into SW. It will usually get you close or at least give you the basic methods.
I also agree with Josh Brady in that the built in documentation is far better than the online version.
John Alexander: 2018 SOLIDWORKS API Help - SolidWorks.Interop.sldworks Namespace is very helpful. Thanks. Unfortunately I only found functions that set what SolidWorks thinks the read only state is, and not the file's actual read-only property on disk.
For the lost souls searching the internet, my workflow to find what I need was:
Go to the link listed above
find on page -> "ModelDoc2"
*discover ModelDoc2 can be reffered to as "IModelDoc2"
follow link for "IModelDoc2"
follow link for "IModelDoc2 Members"
find on page -> "ReadOnly"
*happily discover there is a IModelDoc2.SetReadOnlyState(<value>) command
*happily discover there is a IModelDoc2.GetPathName command
generate the code (which doesn't work as intended):
Dim swApp As Object
Dim vModels As Variant
Dim swModel As SldWorks.IModelDoc2
Dim fullFilePath As String
Dim swDocSpecification As SldWorks.DocumentSpecification
Set swApp = Application.SldWorks
vModels = swApp.GetDocuments ' Contains all open (including invisible) documents
For index = LBound(vModels) To UBound(vModels)
' Loop through all the open documents
Set swModel = vModels(index) ' Get the next document
fullFilePath = swModel.GetPathName ' Get the document's filepath
Set swDocSpecification = swApp.GetOpenDocSpec(fullFilePath)
swDocSpecification.ReadOnly = True