PDA

View Full Version : 2020 Prevent Workset ID from changing



evan549822
2020-06-09, 05:46 PM
When I receive models from consultants I run dynamo to put certain items on shared levels and grids so I can turn them off easily in my model.
Some models I receive are not set up to be a central model, so I do so, so I can dynamo to clean things up.
The problem is the ID is different every time I do this on the same model when I get an update.
So when I reload the model the workers that were turned off get reset.

Does anyone know how I can change the ID of a workset so I can keep it consistent when repeatedly create a workshare model each time i get an update?
Or is there another way to take of this problem?

Also I'm assuming this is my problem of why when loading anew model the worksets that are turned off get reset, this doesn't happen with other models that already have worksets.

david_peterson
2020-07-01, 12:55 PM
I don't believe you can change element IDs. It's also probably not wise to do so, since you won't know what element IDs are available.
Next you could look at the GUID, but I don't think you can change that either.
I did take a peak on the forum.DynamoBIM.org site. That's where you'd find the answer if there was one.

CAtDiva
2020-07-01, 02:57 PM
So I'm guessing you're using worksets for visibility. While this is certainly possible, have you looked into using View Templates and Filters? I find this to be more effective to manipulate graphics/visibility, particularly when working with linked models that have to be reloaded regularly.

Using filters you can identify those items and turn off their visibility in your views. For example, some companies will name their grid & level types to include the company initials, then create a filter that is "Not company" which can then be applied in a View Template and the visibility box un-checked.

evan549822
2020-07-01, 03:41 PM
Thanks all for the input. There are items in the linked file I never want to see in my model but I don't want to delete. So I move them to the shared levels and grids workset and turn it off in my model through manage links.
If if I didn't o this I would still want to turn this workset off in my model.
I figured out though that if I create a workset in my model "framing shared levels and grids" and have this off in all views, then when I make the consultant model a workshared model I name the workset the same.
This way I don't have to turn the workset off in manage links each time.

david_peterson
2020-07-01, 03:47 PM
The issue I see with using workset for VG stuff is the same issue I see when we used cad. Worksets weren't meant to be layers. If you end up with items in the wrong workset you may never seen them until they're trying to install the in the field. I typically always go turn off categories in links (typically all the annotation categories) in the templates and go from there.

Jmhanby
2020-07-01, 04:00 PM
I use work sets for visibility also, like today I inserted the floor outlets in the model, I want to see them on the floor finish plan but not the outlets and switches, so I put them on the floor work set. I still have to master filters, don't understand them yet. Can someone recommend a good tutorial for filters?

evan549822
2020-07-01, 04:04 PM
Yes, I agree this can be an unseen problem!

I run a dynamo graph on all consultant models that move all Levels, Grids, Reference plans, Scope boxes, and Matchlines to the S/L&G workset. It also moves all elements on that workset, not in the list of categories, and moves it to a workset that is turned on. This way I don't turn off something that was mistakenly put on that workset.

david_peterson
2020-07-13, 01:00 PM
This thread might help.
https://forums.autodesk.com/t5/revit-api-forum/set-element-workset/td-p/7706868
This may also be useful
https://thebuildingcoder.typepad.com/blog/2013/01/change-element-workset.html
Of course you could also look at the response from your thread on the Dynamo Forum as well.
https://forum.dynamobim.com/t/change-workset-id/51629
There's also this
https://forum.dynamobim.com/t/extracting-workset-names-and-their-associated-id-numbers-with-dynamo/1931/8
Using this method I'd think you might be able to get that information from the model and feed it into graph your using.
Seems like a better idea than trying to change element IDs