Comonent Attributes Not being saved
-
Hi all.
I've just run into a bit of a problem with component attributes. What I'm trying to do is to be able to create a component, then assign some attributes to it via a simple editor I created and then save the component to a specific subfolder of the Sketchup/Components folder for use in later models.
When I assign the attributes as follows:
e.definition.set_attribute('dict', 'test', 'test')they are available within the component in the initial model, but when I load up the component into a new model from the component browser, the attributes are no longer available. If I save the attributes to the Sketchup.Active_Model as such:
Sketchup.active_model.set_attribute('dict', 'test', 'test')then they are available when I load up the component from the component browser.
I want to be able to assign attributes to specific components and then save them to the component browser, so saving to the Active_Model isn't really suitable. I might be missing something here, but I've been trying to figure this out for a while now.
Any help would be most welcome,
Malcolm Murray -
After assigning the attributes to the definition, did you save out the definition (rather, an instance of it) to an external model?
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