Annotation coloring + copy annotation from one IFC file in to another file
I have started learning more on the annontation tool. However i would like to inquer some assistance.
As it stands now, with the background beeing black for the slabs, my test seems to yield black annontation, instead of a clear color one, making it hard to read. Is there a way in the settings, or a way to alter the color of my annontation?
Secound question would be, if there is a way to save annotation cross files, meaning when building physicians needs to render section cuts, and add in commentaries, if the ARCH group do changes in the file, and sends us an updated one, how can all annotation go from one IFC file, to another one?
Comments
I realise i had a bonus question as well.
If i also want to print out the color i see, as shown underneath, how can that be done? Reason would be to have a propper detailed sketch of thermal bridges to assess how to calculate, and/or how to proceed forward. Seeing the the different colors of the compoments would be an advatage.
The answer to your question is found in the drawing/assests folder. The file default.css defines how items and annotations are drawn. For inspiration of how much you can change the formatting look at the OpeningDesign hub. They have an assets repository you can check out and play with. Either way, you have to understand a bit about css and classes to modify things for your use.

Edit: Now I thought about it for a second, there's also fill-bg class for annotations:
That doesn't require messing with the css.
Can this file be shared publicly? If so, if you can post it here, and I can show you a few approaches.
If not, can you share it privately at [email protected]?
Good morning, parden late reply. had 1 week of flue followed up by a lung infection and a whole week of being admitted to the hospital.
Ill try and take a look at the EPset_annotation. However i have no skills in programming, so this sounds diffecult.
I can send it to you on email, however it is just R&D to scoop the possiblitity for using this. Also creating a drawing take ages as there surly are many elements in the model. Still aviable for this? If you can, and if your interested in interactivee show and tell, i can take time this evening (GMT+1) for a online meet and great with you.
Okay I missed this post, but if this show and tell happens can you please record & share it? In my post I just posted I mentioned having a tutorial for materials, styles etc. for absolute beginners would be great ;)
So this alignes perfectly!
Ugg, sorry to hear about your health bout. Glad you're on the mend!
Feel free to email your file. I'll try to do some tutorial videos with it, and upload them here, so others can learn too.
If you're okay with the file being public, please post it here. If not, no worries.
Evening. Thanks, I am doing a slow recovery, but all in all I am fine.
I'll have to try and seenif I can find public IFC files as we are only consultants receiving these files. So I will thus assume these can not be used openly as this file is a high end luxurious residence project, requiring the company I have to be a bit reluctant on sharing.
As soon as infind a IFC file that is open amd public I'll send you and email.
Found some good public open IFC files. thus i did send now an email to you.
Sharing that i realized after googling alot, it would be incscape which would be used to fill in all the needed sheet data.
However still the background color of my section cut is still black/white. Also i could only change line and text color, but annontation lenght lines will still only be black and thus not visable.
Another thing i can see is when i reopen the saved adjustment, in "Drawings and Documents", it reloads the entire scene. all changes i made most now be done again in Inscape. Is this a bug? i though from videos i found, that when your doing the changes, the drawings will remain as saved, when opening them up from BonsaiBim?
Another thing i can see is when i reopen the IFC file, import in the sheets and drawings, all my annontantion i spent time adjusting possitions/coordinates on has been reset. What is it that i am doing wrong here?
Bonsai creates Drawings from your Model. It creates this drawing by lining your geometry, then overlaying any annotations. This is output in an SVG Drawing file. The styling, colour, dashing is provided by using CSS files that are found in the drawings/assets folder in your project folder. If you want to change the colouring and line styles of your drawing you have to edit the textual CSS file itself. You cannot make changes in the Drawing itself directly, because Bonsai will overwrite them next time the Drawing is created. Then Bonsai has Sheets that are an assemblage of Drawings. When you create a Sheet and add Drawings, a Layout is created. This Layout is comprised of a Titleblock which is the page template, and rasterised images of your Drawings. Initially they are just plonked on the Layout. You need to edit the Layout in Inkscape to put the rasterised images in the correct location on the Layout. Then in Bonsai when you create the Sheet it will take the Layout and place the Drawings in the correct locations.
In effect this is a one way process, and Bonsai will not detect or account for manual changes you make down stream of an action. So if you edit a Drawing's SVG, it will be overwritten next time you Create that Drawing. The same for Sheets.
Basically you should only make changes in Bonsai, or the files in the following folders:
Making changes in the files in these next folders will be overwritten:
The only modification outside the above that I've found that is persistant and that doesn't get overwritten is adding items into the layout. Note you can't edit the Drawing here. It is just a dumb image used for positioning when the sheet is assembled, remember. But you can add native Inkscape items here that will survive Drawing and Sheet recreation.
Apologies if this is repeating stuff you already know, but when someone appears to misunderstand something I find it helps to restate everything as a whole.
I'm not entirely sure I understood the last bit of your post about losing stuff reopening an IFC and whether it is a symptom of not fully understanding the process. If with the benefit of the above explanation you still think there is an issue I haven't explained maybe reply with a fuller explanation. I know my stuff stays where it is supposed to once I understood not to go poking files that are overwritten.
Oof. I realised I missed an important factoid...
When you create a Drawing the CSS file is embedded into the Drawing's SVG file. So you have to change the CSS file in the drawings/assets folder, then generate your Drawing, or you will not see the changes.
And lastly, to give an example from your images, you want to make text labels red:
Open
drawings/assets/default.css
and edit the line that looks like:text, tspan { /* 2.5mm */ fill: black; stroke: none; font-family: 'OpenGost Type B TT'...
to be:
text, tspan { /* 2.5mm */ fill: red; stroke: none; font-family: 'OpenGost Type B TT'...
Your text labels will all be red now. Of course this may be too broad, and make text red that you don't want to be red. In that case you have to narrow a rule down to just make those elements you want red.
Thank you for a more detailed explanation, i will when i have more spare time from work investigate this. Though wish there was UI for this as the threshold is such a huge step for many of us when it comes to changed codes and lines. Never the less, ill come back to confirm if i was sucsessfull.
For your question on what i ment. WHen i place out the annontations i want to have, then i am satesfied for the days worth of work, i save the IFC file. When i reopen and want to again activate my section cut, this happens:
As you can see, all the work placing out where the annotations are, is futile as it is non saveable.
As for my remark when i want to open my drawings in BonsaiBim, all drawings are nullefied. Any changes in Inkscape, placement, color etc are thus override by BonsaiBim creating a new file.
I absolutely cannot reproduce this. Three questions:
1. What version of Bonsai and Blender are you using? (Although the screenshot is showing updated UI for drawings, so I know it is recent.)
2. Can you reproduce this "forgetfulness" in a trivial, non-confidential file that you can share here?
3. Exactly how are you editing the annotations? Like list exact steps, key presses, mouse clicks/drags. Just so I can be sure I'm doing precisely the same actions.
And this is what I explained in the main message. Bonsai will overwrite any modifications you make to Drawings or Sheets if you request it Create them. If I make changes with Inkscape to ./drawings/PROPOSED SECTION 1.svg and save them, then I click:

Then any changes I made are lost. The same is true for Sheets.
This is just the way Bonsai works. The only time you can really edit Drawings and Sheets is as a step after the last time you generate them. Of course if you have any reason to change them later on, then you would end up having to re-do the editing. This is why it is essential that you get the output of Bonsai correct in the first place - avoid using Inkscape to "fix" what you see as issues if you possibly can, and if you must, it has to be the last thing you do, and don't use Create after that.
1.
I use Blender 4.2 with Bonsai V.0.8.-alpha241127
2.
For debug pruprose. I can share this file with you, as long as it wont be used for public training for others. Whats your email?
3.
I am draging them in the edit mode within blender + Bonsai, with mouse click and point. Thus only changing the x and y coordinate of them.
For the latter comment, i though as long as you click the eye icon to view, it wont overwrite. Sadly for me, it still overwrite.
Yup. Recent enough that we should be seeing the same results.
If you click on my profile pic you can send me a private message with the attachment. I don't particularly like publishing my personal e-mail for the world (scammers, bots, hackers) to see.
OK, So I've tried using the plain Blender "G" grab+move, I've used the Bonsai Explore Tools click and drag to move, I've edited the leader line vertices in edit mode. None of them reverted to pre-saved positions.
I absolutely cannot believe this is happening. While I didn't write the original code, I'm the one who revamped the Sheet/Drawing UI. I'm looking at the code that executes when you click the eye icon, and it does not recreate the drawing. All it does is retrieve the URI (filename in effect) and call the command configured in preferences for the svg command. If you haven't set that, it uses the default svg viewer on your system, i.e.

Under no circumstances should the svg file get overwritten by clicking the eye icon.
Okaaaaayyyy... So this is an export from Revit, and it is a bit chunky for my 8 year old laptop, making it kinda slow to test with.






The building is a long way from the origin, and rotated so it is not aligned orthogonally. Editing the dimensions is made harder, because you need to remember to switch to View (Transform Orientations, top-middle, usually says Global) so that you can constrain moves to the X/Y of the camera, and do a scale Z zero. If you don't do this you get wacky valuesbecause the points can be snapping to completely different depths in the camera view.
I'm having major problems editing your dimensions and leaders. Did these also come from Revit, or only created in Bonsai? Or it might actually be because of the buildings rotation causing issues. No idea, but when I try to edit them, they keep "losing" one (or more) of the vertices, leaving only a single one. Very weird. I think I'm starting to understand why you are having so many issues. I'm afraid I'm no expert with this stuff, and I thought you were just having vanilla "getting started" issues. I think you might need more knowledgable help than myself. More specifically people with experience getting Revit into Bonsai. I've seen it said around here that the Revit IFC export quality is... questionable!
Having said that, I managed to edit the following items, did an ifc save, restarted Bonsai, and loaded the ifc, and it preserved the changes:
I don't think I can reliably say how I edited them, because it kept breaking. It was a combination of using View based Transforms, along with scaling in the view Z to zero to stop the wacky values. I'd tab into the dimension, then select and tab into the polyline, at which point all-but-one of the vertices vanished. So I'd have to use "a" (select all) because I couldn't select the vertices with the mouse, then "e" (extrude) to pull a new vertices out, then use shift-z to constrain the new vertices to the same plane, then place it. Once done, tab out, escape, tab out. Quite the performance. And if I go back to edit the dimension again, it deletes the vertices again. Argh! Another quirk to look out for was some oddness (possibly linked to the rotation) where when trying to place vertices, they would blast off to some place way off screen.
Next, here's the timestamp of the Drawing:
I use the eye icon to view the file, and after I've viewed the file:
As you can see. No change to the file modification time. I know it is old, because the changes I made are not in the displayed SVG. So, I will create the drawing now:
It doesn't matter how many times I use the eye icon to view the file, the timestamp does not update. It takes a minute plus for my system to create that drawing, but viewing the resulting svg is near instant. I would know if it was chewing up the processor creating the drawing when I click the eye.
For placement on the Sheet of the Drawing, I see the
layout/A00 - Snitt balkong.svg
file still has the image half off-screen. That needs to be edited:This launches Inkscape with the Layout file (assumes you set the Layout SVG Command in preferences like I did). I move the Guide image so it is centered on the page, and save it in Inkscape. Then I tell Bonsai to Create the Sheet (The printer looking icon). Lastly I view it with the eye icon:
Like I said, I can assist on the easy stuff, but this weirdness in your file (caused by revit, rotation, or whatever) is a bit beyond me.
THis is a huge workaround!
And indeed it is Revit to IFC, all annotation are made in BonsaiBim except height/floor elevation. Funny enough those only became visible once i reopened the IFC file, not when i made the section cut drawing. Even with my high-end work computer, it for sure does take a long time to make the drawings it at first, and i do have a powerfull rigg ment for simulation...
Sadly I as a consultant do not have Revit, we only receive IFC from the ARCH group to do our work, this is the workflow here in parts of Europe. So there is no hope on changing rotation or export settings. It is be default for all projects i have (130+ per year) that the building is not in origo. As it stands with your kindgesture looking into all of this, it seems for me that the current drawing functionality is a bit haltered with exported IFC files, and thus more ment with IFC made from BonsaiBim itself.
To conclude the proof of concept, it will work with what you discovered, though with a lot of extra steps involved. However I dont think I would be able to sell in this workflow as it stands per now. If a developer find this post interesting, and also if this IFC file would be useful to develop the drawings codes more, i am happy to share the file to the developer.