Protect a Room's Tree

Hello

Is it possible to protect the tree structure of a room without blocking the updating of functions?

For example, use the block bar but allow updates.

Thank you in advance for your answers

Kind regards

Have a nice day.

Alex

Can you modify the values but not the functions? 

1 Like

 Hello MaD,

In fact I have a custom properties menu to change the values, the values and the reconstruction update by saving the part because there is also a family of associated parts.

I would just like to lock the tree and that when we save the part, that it updates and its tree with it. 

a priori following this link http://help.solidworks.com/2016/French/SolidWorks/sldworks/c_Changes_Affecting_Frozen_Features.htm

 

You could update even with a block bar but I find it risky because if the user doesn't update before saving it will remain as it is

2 Likes

MaD, in your link it is mentioned that you can update blocked functions, but he didn't specify how to do it, or I read like a blind man.

 

Edit: ok, I understood you have to click on the blocking bar to have the update of the blocked functions, but it doesn't suit me because other users must not know that it is possible to remove this blocking bar. (and yes they don't know it, and believe me it's better that way... ;).

Otherwise you are the only user to modify this file, in this case why don't you make it read-only? 

1 Like

No, the file is editable by anyone, but I would like them to be limited to only the values that can be edited from the custom properties pane.

Hello I don't know if this will help:

In CATIA I provide only the Excel file (user variables)

And the CAD file which is an import with link of the file driven by the table.

In this way, users only see the result of changes in ( user variables).

The import file with link is devoid of history.

 

1 Like

In this case I would go for a macro that displays a UserForm the user fills in the info at the controlled passage if does not set inconsistent values ^^ then modify the preferred part without him seeing that the blocking bar moves to update the part:)

2 Likes

There is an idea, thank you; )  

I had also thought of inserting a part in a part  and making available the Excel file that allows you to set up the mother part, but I haven't tried it yet, and I'm afraid that the updates will be too long or that they won't be done. 

For the macros, I dropped out due to lack of time, I don't really feel relaxed in this area yet, but I'm training on much simpler things for the moment.

 

I'm going away for 2 weeks, and to avoid leaving this question unanswered, I validate MaD's question, theoretically he answers correctly to the meaning of my question.

Thank you to the participants, have a good weekend.

Have a good holiday or trip:)

1 Like

What are all these people who go on vacation... Come on guys, France needs us (or not...)

Ok, I'm going out...

Happy holidays.

1 Like

Hello

As MaD said, I'd go for a macro that displays a UserForm allowing you to do:

- Unlocking of the locking bar (automatic).

- Fill in the desired values in custom properties via text or list fields.

- Reconstruction (automatic).

- Locking of the locking bar (automatic).

- File backup (via a button or automatically).

The API commands for unlocking or locking the blocking bar are:

Dim swApp As Object

Dim Part As Object

Dim boolstatus As Boolean

Sub main()

    Set swApp = Application.SldWorks

    Set Part = swApp.ActiveDoc

    boolstatus = Part.FeatureManager.EditFreeze(swMoveFreezeBarTo_e.swMoveFreezeBarToTop, "", False)

    MsgBox "Unlocked"

    boolstatus = Part.FeatureManager.EditFreeze(swMoveFreezeBarTo_e.swMoveFreezeBarToEnd, "", False)

    MsgBox "Locked"
   
End Sub

Kind regards

2 Likes