[How to] Typing text & editing multiple text annotations at the same time

Hi,

I got some questions regarding text annotations:

  • I want to 'Type' (as in Instance vs Type) text, which is possible, but I also want to give a default text to the Type. Usecase: filling in {{Description}} so that it becomes an automatic tag. Bulk tagging becomes much simpler this way.

Is this possible via another way?

Another question related to this:

  • As I can't 'Type' Text, I want to edit multiple text annotations at the same time. Is this possible?

This is also a general question, as selecting mulitple objects and changing a property only changes it for the last or first selected one, which is annoying. Is there a solution I don't know of? This takes quite some time with everything combined.

This should also work for Attributes, as giving a description or something to a Type doesn't add it to an instance. Is this on purpose?


Thanks in advance!

Comments

  • edited November 2024
    • I want to 'Type' (as in Instance vs Type) text, which is possible, but I also want to give a default text to the Type. Usecase: filling in {{Description}} so that it becomes an automatic tag. Bulk tagging becomes much simpler this way.

    does this help? https://community.osarch.org/uploads/editor/ad/iwyl2h4iv4zq.mp4

    • As I can't 'Type' Text, I want to edit multiple text annotations at the same time. Is this possible?

    This is also a general question, as selecting mulitple objects and changing a property only changes it for the last or first selected one, which is annoying. Is there a solution I don't know of? This takes quite some time with everything combined.

    I don't think this is possible. I put in a feature request, that addresses what I think you're talking about:
    https://github.com/IfcOpenShell/IfcOpenShell/issues/5220

    This should also work for Attributes, as giving a description or something to a Type doesn't add it to an instance. Is this on purpose?

    I think a UI, like this would help in this regard, if i'm following you correctly.

    jes_r
  • This is also a general question, as selecting mulitple objects and changing a property only changes it for the last or first selected one, which is annoying. Is there a solution I don't know of? This takes quite some time with everything combined.

    For objects it can be done like this:

    Not possible with text in annotation though.

    jes_r
  • edited November 2024

    I'm going to try it, seems like it works for this case! Though making a type for text wouldn't be a bad feature right? Or is this not preferred?

    I think a UI, like this would help in this regard, if i'm following you correctly.

    Oh okay, didn't know type and instances both have different attributes but that you could call it (as the description didnt show). So I think the UI update would indeed have prevented my question!

    I put in a feature request, that addresses what I think you're talking about:

    Yes exactly what I meant!

    I didn't know about that option for other objects except for text, as @bruno_perdigao explained with the video, thanks!

  • @jes_r said:

    I'm going to try it, seems like it works for this case!

    This should work, however I get this error if I want to place any of the standard/ default tags:

    Python: Traceback (most recent call last):
    File "C:\Users\Gebruiker\AppData\Roaming\Blender Foundation\Blender\4.2\extensions.local\lib\python3.11\site-packages\bonsai\bim\ifc.py", line 408, in execute_ifc_operator
    result = getattr(operator, "execute")(context)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\Gebruiker\AppData\Roaming\Blender Foundation\Blender\4.2\extensions.local\lib\python3.11\site-packages\bonsai\bim\module\drawing\workspace.py", line 278, in _execute
    getattr(self, f"hotkey
    {self.hotkey}")()
    File "C:\Users\Gebruiker\AppData\Roaming\Blender Foundation\Blender\4.2\extensions.local\lib\python3.11\site-packages\bonsai\bim\module\drawing\workspace.py", line 304, in hotkey_S_A
    create_annotation()
    File "C:\Users\Gebruiker\AppData\Roaming\Blender Foundation\Blender\4.2\extensions.local\lib\python3.11\site-packages\bonsai\bim\module\drawing\workspace.py", line 184, in create_annotation
    create_annotation_occurrence(bpy.context)
    File "C:\Users\Gebruiker\AppData\Roaming\Blender Foundation\Blender\4.2\extensions.local\lib\python3.11\site-packages\bonsai\bim\module\drawing\workspace.py", line 171, in create_annotation_occurrence
    bonsai.core.type.assign_type(tool.Ifc, tool.Type, element=element, type=relating_type)
    File "C:\Users\Gebruiker\AppData\Roaming\Blender Foundation\Blender\4.2\extensions.local\lib\python3.11\site-packages\bonsai\core\type.py", line 39, in assign_type
    type_tool.change_object_data(obj, type_data, is_global=False)
    File "C:\Users\Gebruiker\AppData\Roaming\Blender Foundation\Blender\4.2\extensions.local\lib\python3.11\site-packages\bonsai\tool\type.py", line 33, in change_object_data
    tool.Geometry.change_object_data(obj, data, is_global)
    File "C:\Users\Gebruiker\AppData\Roaming\Blender Foundation\Blender\4.2\extensions.local\lib\python3.11\site-packages\bonsai\tool\geometry.py", line 54, in change_object_data
    obj.data = data
    ^^^^^^^^
    TypeError: bpy_struct: item.attr = val: Object.data expected a Image type, not Mesh

    Happens in a new file too

    (Bonsai 0.8.0 and Blender 4.2.1)

  • what version of Bonsai, are you on?
    It should say down here...

    engfernandocarlopav
  • If you get an error, i like to take a snippet of the last line or so, of the error message, and do a search on github issues.
    So that this..
    TypeError: bpy_struct: item.attr = val: Object.data expected a Image type, not Mesh...
    for this search.
    https://github.com/search?q=repo:IfcOpenShell/IfcOpenShell+TypeError:+bpy_struct:+item.attr+=+val:+Object.data+expected+a+Image+type,+not+Mesh&type=issues
    You might find some similar problems, and hopefully solutions. :)

Sign In or Register to comment.