Macro: put read-only file

Would anyone have a SolidWorks macro to make a file (part or asm) read-only as well as the reverse macro, remove read-only?

Hello

Yes, I posted it on Lynkoa as a tutorial!

You can find it here:

http://www.lynkoa.com/tutos/3d/macro-solidworks-retirer-lecture-seule-pour-fichiers-de-bibliotheque

 

I believe I have commented on each line for clarity.

1 Like

Hello

If you have MyCAD tools, we can do it easily with integration!

2 Likes

I got your macro, but why is the file in  ".bottom" and not ".swp"?

so I can't integrate this macro in SW

Here is the procedure:

"In the Microsoft Visual Basic window, from the menu with " File " you can " import a file " and choose the .bas file"

Do you have to do it from SolidWorks or from Windows?

From Microsoft Visual Basic from SolidWorks!

@Lucas,

I don't have SolidWorks visual basic!!!

By doing ALT F11 from SolidWorks, do you find yourself in Visual Basic? Or from the "Tools > Macro" menu

Well there you can import the macro in .bottom

Since SolidWorks (SW2014 SP4.0), the ALT+F11 doesn't give me anything.

From SOlidworks then Tools then Macros, I have the choice between:

  • Edit
  • Short story
  • .....

If I take one of the 2, I can only import the following exentions:

*.swp

*.vbproj

*.csproj


2014-09-08-macro.png

Ok, I can't test now on 2014, but I found it in SWP, I'm attaching it to this message.

For your information, it is not commented but it is very succinct.


bibliotheque_lecture_seule.swp
1 Like