Link Component Attributes to IFC Text fields
-
I'm looking for a way to link the Component Attributes Text (that changes depending on the component behaviour in the model) to the IFC Text that is possible to fill from the Component Options Window. Is there any trick / code / snippet to make this work? or is this something really complex to achieve?
Thanks,
Stefano
-
The core code would look like this: Assume there is a single Component selected.
model = Sketchup.active_model instance = model.selection[0] attributes = instance.definition.attribute_dictionary("dynamic_attributes") name = attributes["name"] desc = attributes["description"] path = ["IFC 2x3", "IfcFurnishingElement", "Name", "IfcLabel"] success = instance.definition.set_classification_value(path, name) path = ["IFC 2x3", "IfcFurnishingElement", "Description", "IfcText"] success = instance.definition.set_classification_value(path, desc) -
It's unclear to me how the plugin would know to use "IfcFurnishingElement" as the type in the path. There does not appear to be any way to retrieving this type using a plugin. So I'm stumped.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better π
Register LoginAdvertisement