The 'NLRS_C_content_versie' is a type parameter?
You are using the LoadFamilySymbol to load a symbol in a existent Family.
That's a good questing if the IFamilyLoadOptions should trigger with a FamilySymbol conflict.
The 'NLRS_C_content_versie' is a type parameter?
You are using the LoadFamilySymbol to load a symbol in a existent Family.
That's a good questing if the IFamilyLoadOptions should trigger with a FamilySymbol conflict.
Yes, the parameter is a type parameter.
I try to reload it in a project.
The IFamilyLoadOptions doesn't trigger.. i guess because the family is already in the project by the first action, but I reloaded a specific symbol.
I see a remark on the OnFamilyFound bool, it says should only trigger when family is changed, in this case it isnt ...
I tried to create a temp file, but nothing works
Hi @jw.vanasselt,
I haven't looked into the full code, maybe a variable is re-used or something...
But keep in mind filtering for a Symbol only using it's familyname and typename CAN return others if the Category isn't taken into account. Familynames across categories can be thesame.
Given that with the typename the chance is low. I never use FirstOrDefault in such case, but test the collector on count = 1 (Or use Single/SingleOrDefault) -> Well not for UserFamilies..So would be relative save as long as they aren't named after system families (A window family "Walls" can exist...)
Does the Type come from the family file or a TypeCatalog?
From the documentation:
Return Value
True if the family type/symbol was loaded successfully into the project, otherwise False. -> So not sure what happens if the type values are changed in the project but the Family file on disk isn't. -> In the UI this won't trigger a warning and no option to overwrite the values of the family type in the project.
If you change something to the Family File (new type + delete type) it's seen as changed, maybe same for the API version?
I would test it out with a small controlled code snipplet (fixed family name, maybe even fixed ID...) in the API and see what it does in each situation + identical test in the UI (Same unchanged family and a updated family from disk).
I'm doing some unit test to understand what is happening, and when loading the same family file the LoadFamily return false even if I change the parameters in the symbols. The LoadFamilySymbol return true but the parameter in the type is not replaced.
Looks like the main Family need to be changed in some way to make IFamilyLoadOptions to trigger and replace the parameters.
If you change the type parameter and try to load the family again, if is the same file does not seen to replace the parameters. I tried to copy the file, and didn't work. Only if I changed the Family and reload in some way in the project.
Here is the test project:
And what if it's loaded from another location?
The location a family is loaded from is available in the project, so that should update if loaded from another location....
I tried to copy the file to a different folder and Revit is smart to know that is the same file, is not gonna reload a family that is already loaded.
Hello everyone,
I am a newbie to BIM360/ACC APIs. Until now I used to work with Revit/Navis APIs only.
I asked that same question in the BIM360 API forum - but 0 responses..
I would like to develop a simple app that loads my bim360/acc model (using document management API?) on one part of the screen and reads data from specific elements from that model on the other part of the screen.
I was wondering:
1. If some of my projects are on bim360 and others are on acc - should I develop 2 different apps?
2. Are there any tutorials / free online examples (source code) / templates to help me begin with this kind of development?
Thank you!
Hi everyone,
I'm working on a Revit API project and am trying to purge unused fabrication services.
I've encountered a challenge: Revit doesn't allow the unloading of unused services when their corresponding configuration is unloaded.
But when using the Purge command, unused services can be unloaded.
Currently, I'm using the UnloadServices method to unload unused services, but it's ineffective when the configuration cannot be loaded.
```
fabConfig.ReloadConfiguration();
fabConfig.UnloadServices(unusedServiceIds);
```
Does anyone have a solution for purging unused fabrication services using the Revit API, even when the configuration is unloaded?
I'd appreciate any guidance or suggestions.
Hi guys,
I wrote a modelless form that creates an element by picking two points after clicking a button.It usually runs well, but sometimes it causes Revit to crash without throwing any exceptions.I checked the Revit journal:
"
C 11-0ct-202412:0057.114;0:< ExceptionCode=0xc0000005 ExceptionFlags=0x0000000 ExceptionAddress=O000FF96A57D8DA'0:< System (MB)[Available / Total ] [Revit Memory Usage (MB) ]
'0:< RAM Statistics: 1415/ 163832768=InUse2777=Peak
' 0:< VM Statistics: 134176630/ 1342177272549=InUse 2560=Peak
'1:;< :104: Delta VM: Avail +8 ->134176633 MB, Used -2->2549 MB;RAM:Avail -23 -> 1391 MB,Used 2768 MB
'1;< DBG INFO: Detected unfrozen change of selection: line 609 of d:ship\2016 px64sourcelrevitlrevitui\modscope\ModScope.cpp'1:<;PERF;MISC,FulUpdateGraphicCacheUpdater:updateAll)DBViewProject id=3651:706 elements need cache update
'1:< ;PERF;MISCFulUpdateGraphicCacheUpdateraupdateAll) DBViewPlan id=6825513 (in RrtLinkInstance id=8214505):16462 elements
"
What is the reason for this problem?
Any help would be great.
Thanks for building the test @ricaun !
Well that's exactly the thing I need.
I tried it manual with the same result.
The only method I found is to rename the family with _old and reload the new one.
Any other ideas?
It is a family type, not a catalog
Hi,
Sean Page shared I nice tutorial how to start with access the APS
https://youtu.be/whQ9ZSxjtDc?si=Y0wjK3lVk24HU0c_
Yes, i guess you need to build 2 endpoints. As far as i know the request of acc and bim 360 is not the same. The documentation can tell you that.
Is you rename you gonna need to find all the instances and replace with the new family, and could be some reference you could forget to swap.
Another way would be to open the family changed something without changing and reload in the document. The next time you try to load the same family should be different and IFamilyLoadOptions trigger and the type parameter is replaced.
This code force to open the family, change the current type name and rollback, and load back in the document.
The only problem could be if you have a big document and this could take a while to regenerate the document after reload the family.
Here is the FamilyUtils class:
That's a nice one will try at monday!
I’m using rule.GetRuleParameter() (where rule is a FilterRule), and it returns a valid ElementId. However, when I try to retrieve the element using doc.GetElement(id), it always returns null.
I’ve checked across all available documents, but the issue persists.
Why is this happening, and how can I properly retrieve the rule parameter element?
Thanks!
Hi everyone,
I am trying to set a view's crop region shape by the code below,
view.GetCropRegionShapeManager().SetCropShape(CurveLoop)
When i run the addin in revit, it gives me "The crop of the associated view is not permitted to have a non-rectangular shape." error. Is there any solution for this?