sketchucation logo sketchucation
    • Login
    1. Home
    2. kdasilva
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info
    K
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 10
    • Posts 30
    • Groups 1

    kdasilva

    @kdasilva

    10
    Reputation
    1
    Profile views
    30
    Posts
    0
    Followers
    0
    Following
    Joined
    Last Online

    kdasilva Unfollow Follow
    registered-users

    Latest posts made by kdasilva

    • RE: Quick theoretical question

      Wow that sounds really cool, and totally outside my skill level 😛 I just said MySQL/PHP since i did GeoWeb stuff before, its probably not too practical in this situation.

      I hope you don't mind if summarize what you said into a few sentences and slide it right into my thesis 😄

      I'll be sure to give you (and everyone else from this site who without my thesis work would of failed) a shout out in my acknowledgments.

      Out of curiosity, is the work your doing (mtalbott) going to be released publicly one day? or is it personal use? I'm always looking at new ways get citizens designing collaboratively with different visualization methods, and what you described has sooooo much potential.

      Cheers,
      Korbin

      posted in Developers' Forum
      K
      kdasilva
    • RE: [Plugin] Voxelize - Updated 2011-04-04

      very cool!, you said each cube is an instance, could you swap out the definition to make an object composed to a bunch of tiny anythings? could auto scale the component to fit in your cube, then make all sorts of crazy things.

      also, not that it matters, but it seems like the red face matches the red axis, but the blue face follows the green axis and the green face follows the blue axis. Intentional?

      posted in Plugins
      K
      kdasilva
    • Quick theoretical question

      Hi again,

      I am just writing up the conclusion for my thesis and was asked by my prof to speculate about better integration with web 2.0 services. Without really needing any detail per say could anyone speculate into the possibilities of sharing sketchup information between computers live through web-dialogs or something. I was thinking maybe something with PHP/MYSQL could share variables information....but it would probably be pretty limited..every entity would have to be broken down to coordinates or something? Any way, wild speculation is welcome, like i said its just for a consideration in my conclusion.

      Cheers
      Korbin

      posted in Developers' Forum
      K
      kdasilva
    • RE: Have moved to Linux Mint 10. Sketchup in Linux?

      As for Sketchup going to Linux,

      Aidan Chopra (the Sketchup product evangelist) spoke at my uni about a month back and someone asked about plans of Sketchup going to Linux. He was pretty clear that it wasn't on Google's list of things do.

      posted in Developers' Forum
      K
      kdasilva
    • RE: Attribute dictionary in callback

      I appreciate all your help, but I am still unsure on why my get get_attribute method would return nil in a different call back? is there a scope issue I am not accounting for? the get_attribute works within the same callback so I am lead to believe that the instance name is working as a key...

      posted in Developers' Forum
      K
      kdasilva
    • RE: Attribute dictionary in callback

      @tig said:

      You CAN set/get attributes for the model, a definition, an instance or any other 'entity' for that matter...

      So you need to decide the best way to do what you want...

      If the user is selecting an instance and giving it a 'description' you can set that as an attribute for the instance itself. To get the values later set up something that does this type of thing model.definitions.each{|defs|d.instances.each{|i|###code to check the type and attributes etc###}}
      IF certain things are true you can then add those as variables /a to an array etc...
      OR if you know the few components that you want to check then just limit your check to those... by name compo1="myCompoA" etc... and the collection is insts=[] [compo1,copmo2,compo3,compo4].each{|cname| arr=[]; model.definitions[cname].instances.each{|i| arr << i if i.get_attribute==???}; insts << arr}
      Now 'insts' contains all of the matching instances...

      I dont understand why I need all of these arrays etc...I was thinking I just needed a dictionary I can save to the model, or that particular layer...which inside simply has a key (the instance unique identifier, ie name) and an associated attribute (the description), from this if I wanted all of the descriptions I can just grab the whole dictionary and iterate through it....

      posted in Developers' Forum
      K
      kdasilva
    • RE: Attribute dictionary in callback

      @tig said:

      Perhaps to need to explain it better is 'words' rather than code snippets that don't tell the whole story.

      sure~

      Basically the user starts by using a icon to place and size instances around the map, [this part works good]

      then they are supposed to be able to select an instance write a description of (ie why it was placed their etc) and then push a button in the webdialog that takes the selection, and the text in the (the description variable you asked about) and should then store the description as an attribute, so later you can select a instance, push "view" and the description can be read in the webdialog GUI. There are four different component definitions, so the code takes the selection, checks which definition it has, and then should add or replace the attribute assigned to the the key (the particular instance)

      should I perhaps be making the dictionary for the definitions themselves?? But how do I create a dictionary without first having a key->attribute to initialize it with.....hmm I think I just confused myself more...so I dont know if that description helped

      thanks!
      Korbin

      posted in Developers' Forum
      K
      kdasilva
    • Attribute dictionary in callback

      Hello I had hopefully a quick question that I cant seem to find the answer,

      I am having trouble getting information from an attribute dictionary i created in a different callback, for example:

      
      elsif diagnosis_selection.definition == comp_def_R
      	new_R_dictionary = model.set_attribute "repairdictionary", diagnosis_selection.to_s, description
      	print_R_dictionary = model.get_attribute "repairdictionary", diagnosis_selection.to_s
      	js_update_command = "UpDateDiagnosis(\""+ print_R_dictionary +"\")"
      	web_dialog.execute_script(js_update_command)
      
      

      (description is text passed through the webdialog, assigned as an attribute to a instance where its name being the key)

      However when trying to access the same attribute dictionary in a separate callback:

      
      print_R_dictionary = model.get_attribute "repairdictionary", diagnosis_selection.to_s
      puts print_R_dictionary
      
      

      I keep getting nil, when having the same instance selected. how I can I make two seperate callback read the same attributes. I have done it in other parts of my app, however there the attributes is initialized outside of the callbacks...but here I cant create them until I have the keys and this happens in the first callback....

      any help appreciated...I I'm presenting at a conference across the country on the project and urban design visualization so i'm hopping to have as much working as I can.

      Cheers~
      Korbin

      posted in Developers' Forum
      K
      kdasilva
    • RE: .execute_script interesting quirk

      @tig said:

      I have several custom tools using href button with rounded ends etc instead of standard buttons - this way [you define the button class in your css style code] - the call_backs work fine - here's a snippet...

      <span class="syntaxdefault"><br /></span><span class="syntaxkeyword"><</span><span class="syntaxdefault">td align</span><span class="syntaxkeyword">=</span><span class="syntaxdefault">center style</span><span class="syntaxkeyword">=</span><span class="syntaxstring">"width;84px; padding;3px;"</span><span class="syntaxkeyword">><br /></span><span class="syntaxdefault">      </span><span class="syntaxkeyword"><</span><span class="syntaxdefault">a id</span><span class="syntaxkeyword">=</span><span class="syntaxstring">"cancel_dropdown"</span><span class="syntaxdefault"> <br />         class</span><span class="syntaxkeyword">=</span><span class="syntaxstring">"button"</span><span class="syntaxdefault"> href</span><span class="syntaxkeyword">=</span><span class="syntaxstring">"#"</span><span class="syntaxdefault"> <br />         onclick</span><span class="syntaxkeyword">=</span><span class="syntaxstring">"this.blur(); window.location='skp;cancel_dropdown@';"</span><span class="syntaxkeyword">><br /></span><span class="syntaxdefault">      </span><span class="syntaxkeyword"><</span><span class="syntaxdefault">span</span><span class="syntaxkeyword">></span><span class="syntaxdefault">Cancel</span><span class="syntaxkeyword"></</span><span class="syntaxdefault">span</span><span class="syntaxkeyword">><br /></span><span class="syntaxdefault">      </span><span class="syntaxkeyword"></</span><span class="syntaxdefault">a</span><span class="syntaxkeyword">><br /></</span><span class="syntaxdefault">td</span><span class="syntaxkeyword">></span><span class="syntaxdefault"> </span>
      

      even the .execute_script command? everything else works for me too except for that....although looking at your code it may be because i used:

      <a href="javascript:AddChangeDiagnosis()" ><b>[Add/Change]</b></a>

      to call the function, whereas both my buttons and the image i click use the "onclick" attribute

      ** confirmed....that was the problem, sooo take home lesson...always use "onclick" !

      posted in Developers' Forum
      K
      kdasilva
    • .execute_script interesting quirk

      I thought this experience would be worth sharing in case anyone else gets stuck like i did~

      So i don't know if this qualifies as a "bug" per say...but it definitely made my morning long and frustrating.

      Has any one else noticed that if you create an action_callback through clicking on a <a href...> tag instead of a button, the .execute script command no longer works on the web_dialog parameter. Correct me if Im wrong but I spent all morning testing this problem with two cal_backs that were essentially identical. It took me several hours to realize that the only difference was one got created through a button, and the other through a hyperlink

      everything else I worked in the callback except for .execute_script for the record

      (I was just using hyper-links because the buttons were so ugly)

      It would be interesting to see if other methods of creating a call_back in a webdialog have this bug.

      cheers
      Korbin

      *Update I did a quick test on a callback created through clicking on an image I have in my app, and it worked fine...verrrrry interesting

      posted in Developers' Forum
      K
      kdasilva