sketchucation logo sketchucation
    • Login
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    Turn component into non-editable DC

    Scheduled Pinned Locked Moved Developers' Forum
    2 Posts 1 Posters 185 Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H Offline
      HPW
      last edited by

      My Autocad-blocks have an extensive set of EED-based attributes stored at the block-instance.
      On Export/Import in SU they gets lost and I ended with a simple component without any info/logik.
      But it would be no problem to setup a parallel info-file with autolisp to transport this information. The blockname would be the reference key.

      So is it possible to turn a component into a DC with ruby?

      In the first step it would be nice when I could set up the attributs in a non-editable way.
      So a user could use the 'Component options' button and click on my component and the Component options web dialog would open and show the stored attribute and non-editable values (greyed-out).
      That would allow to import additional info about this component, without the need of a full blown DC-Logik behind it.

      Ot cource adding Interaction-logik to use with the interact tool will be the next wish.

      Other threads here in the forum mainly do reading attributes or set existing attributes.
      So whats the real difference in the SU-database between a component and a DC ?
      The existence of the attributes? Any flags?

      Regards

      Hans-Peter

      1 Reply Last reply Reply Quote 0
      • H Offline
        HPW
        last edited by

        The sample 'Make Sang Red' from here:

        http://www.sketchucation.com/forums/scf/viewtopic.php?f=180&t=17888&p=145120&hilit=Make+Sang+Red#p145120

        might help:

          # Add a new configurable option to Sang.
          # (Any attribute that starts with an underscore
          # is a "meta attribute" that describes behavior.)
          sang_def.set_attribute 'dynamic_attributes',
            'weight', '145'
          sang_def.set_attribute 'dynamic_attributes',
            '_weight_label', 'weight'
          sang_def.set_attribute 'dynamic_attributes',
            '_weight_formlabel', 'My Weight'
          sang_def.set_attribute 'dynamic_attributes',
            '_weight_units', 'STRING'
          sang_def.set_attribute 'dynamic_attributes',
            '_weight_access', 'TEXTBOX'
        
        

        Not sure if this would enough to make a normal component into a DC!
        Will try.

        1 Reply Last reply Reply Quote 0
        • 1 / 1
        • First post
          Last post
        Buy SketchPlus
        Buy SUbD
        Buy WrapR
        Buy eBook
        Buy Modelur
        Buy Vertex Tools
        Buy SketchCuisine
        Buy FormFonts

        Advertisement