sketchucation logo sketchucation
    • Login
    1. Home
    2. azuby
    3. Posts
    Oops, your profile's looking a bit empty! To help us tailor your experience, please fill in key details like your SketchUp version, skill level, operating system, and more. Update and save your info on your profile page today!
    ⚠️ Important | Libfredo 15.6b introduces important bugfixes for Fredo's Extensions Update
    A
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 23
    • Posts 305
    • Groups 1

    Posts

    Recent Best Controversial
    • RE: Start_operation backward compatibility

      But when using old plugins with new Sketchup you need to make sure your overwriting code is loaded before the old plugins are loaded. Maybe you want to program a "Load Old Plugins" Plugin, put the old plugins into a separate folder, ...

      For your if-statement: Sketchup.version[0,1].to_i

      azuby

      posted in Developers' Forum
      A
      azuby
    • RE: WebDialogs: To sub-class or not?

      a) subclassing and instancing
      b) instancing

      If you only need a window to display information, b) would do it. But if your dialog is more complex, subclassing seems to be a good choice, because you can let your class do a lot of things, i.e. generating the HTML by overriding the original set_html method:

      class AzubyDialog < UI;;WebDialog
        private
          def generate_html arg
            s = ''
            # TODO; implement your HTML generator code
            s
          end
        public
          def set_html arg
            super(arg.kind_of?(String) ? arg ; generate_html(arg))
          end
      end
      

      azuby

      posted in Developers' Forum
      A
      azuby
    • RE: WebDialog crashes Sketchup

      Hm OK, you see me surprised. Till now I have used an HTML code similar to the following for my "Update" button:

      <input type="button" onClick="javascript&#058;window.location = 'skp;foo@'; return false" value="Update">
      

      After I changed it to:

      <input type="button" onClick="javascript&#058;window.location = 'skp;foo@bar'; return false" value="Update">
      

      Sketchup doesn't crash any longer.

      puts "Well, and now I'll clean up my Ruby code."

      what the f...

      =begin
      azuby
      =end

      posted in Developers' Forum
      A
      azuby
    • RE: WebDialog crashes Sketchup

      Oh, its not a Sketchup observer, its my own one. You know, porgramming design pattern and such things 😉

      azuby

      posted in Developers' Forum
      A
      azuby
    • WebDialog crashes Sketchup

      Hey folks,

      programming a Ruby plugin I came across a problem which I have had in the past: Working with WebDialogs can cause Sketchup to crash. My problem - I don't know why. Does anybody know of problems concerning WebDialogs? Maybe I'm using a 'wrong' way to get values from the dialog or my plugin works on too much data.

      The situation: I have a value matrix which I can update by entering values to the dialog. When pressing my "Update" button, Sketchup calls my action callback. This one informs an observer and this one should extract the values from the dialog by using WebDialog#get_element_value. And sometimes the plugin does not crash ... hm.

      Unfortunaltely I can't show you my code because it is too much and complex.

      I use Sketchup 6.

      Ask me if my problem isn't clear enough.

      azuby

      posted in Developers' Forum
      A
      azuby
    • RE: How do I create a rb file

      What does it mean: "It don't work." Maybe you're using Windows and have enabled hiding file extensions. You should disable this in Windows.

      azuby

      posted in Developers' Forum
      A
      azuby
    • RE: Ruby scripting interface

      NetBeans Ruby IDE
      SciTE
      Windows Notepad
      TextPad
      d/Code (I'm my own software tester 😉)
      DOS edit
      ... depends on what I have to do.

      azuby

      posted in Developers' Forum
      A
      azuby
    • RE: [Plugin] Hide all Edges

      Maybe my HideEdges Ruby script could also be a good choice. It can work on all or only on selected entities (but unfortunately not on component instances). A toolbar button isn't included, but a right-click menu item. (see my signature)

      azuby

      posted in Developers' Forum
      A
      azuby
    • RE: [REQ] Appcasting or Sparkle for automatic updates of rubies?

      Yes, it is possible:

      1. to notify you of new updates
      2. to "download" the updates
      3. to "install" the updates

      For the SCP* (Sketchup Community Plugin) I've added a simple update mechanism for link lists - this also could be used to get single, non-crypted script files. In combination with a little bit server-side programming (hopefully in Ruby, but unfortunately most poeple use PHP 😮) you could upload you scripts directly to your webspace without modifying other code and have them ready for automatically downloads.

      azuby

      • SCP: It's open, you can digg into it 😄
      posted in Plugins
      A
      azuby
    • RE: Scrambling Scripts

      The d/Code plugin also provides this feature.

      azuby

      posted in Developers' Forum
      A
      azuby
    • RE: Problem of using FxRuby in Sketchup

      Maybe it's because of threads. As far as I know the GUI toolkits need their own main thread.

      azuby

      posted in Developers' Forum
      A
      azuby
    • RE: @Jim and other coders

      Using Object#respond_to? should also be possible. And if you really want to use "OnTransactionEnd", set an alias on "OntransactionCommit"

      azuby

      posted in Developers' Forum
      A
      azuby
    • RE: SketchUp Arrays & Enumerable

      Maybe it depends on the Sketchup version you are using? Mine is 6.4.112 and the result of "puts Array.new.methods.sort" is:

      &
      *
      +
      -
      <<
      <=>
      ==
      ===
      =~
      []
      []=
      __id__
      __send__
      all?
      any?
      assoc
      at
      class
      clear
      clone
      collect
      collect!
      compact
      compact!
      concat
      cross
      delete
      delete_at
      delete_if
      detect
      display
      distance
      distance_to_line
      distance_to_plane
      dot
      dup
      each
      each_index
      each_with_index
      empty?
      entries
      eql?
      equal?
      extend
      fetch
      fill
      find
      find_all
      first
      flatten
      flatten!
      freeze
      frozen?
      get_binding
      grep
      hash
      id
      include?
      index
      indexes
      indices
      inject
      insert
      inspect
      instance_eval
      instance_of?
      instance_variable_get
      instance_variable_set
      instance_variables
      is_a?
      join
      kind_of?
      last
      length
      map
      map!
      max
      member?
      method
      methods
      min
      nil?
      nitems
      normalize
      normalize!
      object_id
      offset
      offset!
      on_line?
      on_plane?
      pack
      partition
      pop
      private_methods
      project_to_line
      project_to_plane
      protected_methods
      public_methods
      push
      rassoc
      reject
      reject!
      replace
      respond_to?
      reverse
      reverse!
      reverse_each
      rindex
      select
      send
      shift
      singleton_methods
      size
      slice
      slice!
      sort
      sort!
      sort_by
      taint
      tainted?
      to_a
      to_ary
      to_b
      to_s
      transform
      transform!
      transpose
      type
      uniq
      uniq!
      unshift
      untaint
      values_at
      vector_to
      x
      x=
      y
      y=
      z
      z=
      zip
      |
      
      posted in Developers' Forum
      A
      azuby
    • RE: [REQ]Chat Plug-in

      A while ago I wrote the Plugin SCP. There you only would need to add your chat URL to the favorites list.

      azuby

      posted in Plugins
      A
      azuby
    • RE: Rubyskript pausieren bzw. Aktion abwarten

      Die API-Dokumentation erzählt nur davon, dass sie mit Sekunden arbeitet: http://download.sketchup.com/OnlineDoc/gsu6_ruby/Docs/ruby-ui.html#start_timer

      Du kannst natürlich Float-Werte versuchen, also 0.1 und ähnliche.

      azuby

      posted in Deutsch
      A
      azuby
    • RE: Dateien über mehrere Sketchups nutzen

      Die heißen nur in Mac OS X Aliase. Der Grundstein von Mac OS X ist ein ein BSD, also so eine Art Unix. Und da heißen die Dinger immer noch Links 😄

      Außerdem muss ich korrigieren: Die Dinger heißen nicht Softlinks, sondern Symbolische Links. http://de.wikipedia.org/wiki/Harter_Link Dabei fällt auf, dass es für Windows neben Junction noch andere Tools gibt.

      azuby

      posted in Deutsch
      A
      azuby
    • Dateien über mehrere Sketchups nutzen

      Ausgangspunkt ist dieser Thread: http://sketchucation.com/forums/scf/viewtopic.php?f=180&t=11967 - aber die liest wahrscheinlich nicht jeder. Vielleicht könnt ihr den Tipp dennoch gebrauchen. Ich weiß, die Überschrift ist etwas blöd - wer eine bessere findet ...

      Folgende Problemstellung: Man hat auf einem Rechner mehr als eine Sketchup-Version installiert (die laufen nebenbei bemerkt auch un-installiert) - wer das nicht hat, kann trotzdem mal bis zur -> Idee weiterlesen. Nun benutzt man diverse Plugins, will diese aber über die Sketchup-Versionen hinweg konsistent halten. Eigentlich braucht man dafür zwei Plugins-/Tools-Verzeichnisse - nämlich in jedem Sketchup-Installationsverzeichnis eines. Nun fiel mir aber ein, dass es auch in Windows, nicht nur in Linux, eine Möglichkeit gibt, das zu umgehen. In Linux (und auch Mac) heißen die Dinger Links - es gibt Hardlinks und Softlinks. In Windows heißen sie Junctions. Junctions sind zwar etwas weniger mächtig als Links, das stört uns momentan jedoch nicht.

      Es funktioniert für Windows ab Version 2000. Außerdem muss das Dateisystem unbedingt NTFS sein. Das lässt sich prüfen: Arbeitsplatz > Rechtsklick auf ein Laufwerk, Eigenschaften.

      Ein bisschen zum Hintergrund: Wir kennen ja alle Dateien und Ordner. Sonst gibt es in Windows nur noch Verknüpfungen und ein paar Spezialsymbole. Verknüpfungen sind aber wirklich äußerst schwach. Dateien und Ordner liegen quasi physikalisch irgendwo auf der Platte, sie haben je einen Namen und auf der Platte eine Adresse. Junctions sind im Prinzip sowas wie ein zweiter Eintrag für denselben Ordner, sie verweisen auf die Adresse des Originalordners, reagieren aber nach außen hin so, als würde der Ordner dort "losgehen", wo die Junction liegt.

      Das ist für unsere Bedarfe echt praktisch. Stellt euch vor, ihr habt also einen zentralen Ordner mit Plugins und mehrere Sketchups. Dann legt man in die jeweiligen Sketchup-Verzeichnisse statt der originalen Plugins-Verzeichnisse nur eine Junction auf das zentrale Verzeichnis.

      So, wie geht das?:
      a) Dateisystem: NTFS
      b) Junctions-Werkzeug herunterladen: http://technet.microsoft.com/en-us/sysinternals/bb896768.aspx
      c) Installation nicht notwendig, einfach das Werkzeug ins Sketchup-Verzeichnis kopieren
      d) Jetzt z. B. das Tools-Verzeichnis nach C:\ verschieben
      e) Kommandozeile aufmachen und ins Sketchup-Verzeichnis wechseln
      f) Eingeben:

      junction Tools C;\Tools
      

      g) Sketchup starten. Nichts sollte sich oberflächlich geändert haben.

      Wenn man die Tools-Junction wieder löschen möchte, das auch über die Kommandozeile machen:

      junction -d Tools
      

      Dabei wird nur die Junction gelöscht, nicht C:\Tools

      Ich habe noch eine andere Idee, wofür man das nutzen kann: Stellt euch vor, ihr habt ein kleines Unternehmen / Netzwerk und alle Leute sollen mit den selben Plugins arbeiten. Dann legt man die irgendwo zentral (z. B. auf einem NAS) ab, bindet das zentrale Netzwerkverzeichnis über einen Laufwerksbuchstaben in Windows ein und legt dann eine Junction zum Sketchup-Verzeichnis.

      Das Ganze ist nicht nur für Plugins zu gebrauchen. Im Sketchup-Verzeichnis findet man ja auch das Verzeichnis Components mit grundlegenden Komponenten. Oder Materials mit grundlegenden Materialien. Und Styles. Und ob das mit Importers und Exporters auch problemlos klappt, weiß ich nicht.

      Für den Mac habe ich es noch nicht probiert. Der bietet wie gesagt sog. Links an. Eigentlich müsste das auch funktionieren.

      azuby

      posted in Deutsch
      A
      azuby
    • RE: Producing an error message for a run-time ruby error

      I think we should think about a "service library" instead of letting the single coders (re)define their own methods. Because some of them may think of changing the behaviour of the method which may influence other plugins. And with such a library Sketchup only loads and interpretes the code once and will start faster.

      azuby

      posted in Developers' Forum
      A
      azuby
    • RE: Producing an error message for a run-time ruby error

      I think it's better to use MB_MULTILINE instead of MB_OK, because this way the user can select and copy the message and the email address.

      azuby

      posted in Developers' Forum
      A
      azuby
    • RE: An alle, die des deutschen mächtig sind :-)

      Also ich komme da nicht mit: Wer "deutsch" ist und schon mal aktiv war, wird automatisch einer bestimmten Gruppe zugeorndet. Wer nicht "deutsch" ist, der nicht. Wer Gast ist, kann alles, was die "Deutschen" reen, sehen. Wer nicht Gast und nicht "deutsch" ist, kann das nicht. Wie geht man dann mit Leuten um, die in mehreren Sprachen zu Hause sind, etwa mit unseren guten französischen Freunden, die sich auch mal im deutschsprachigen Teil tummeln? Müssen die sich dann ausloggen, um überhaupt die "deutschen" Beiträge lesen zu können und haben dann aber keine Chance mehr, zu antworten?

      edit: Ach ja, ich wünsche dir einen angenehmen und vor allem erholsamen Urlaub:
      @unknownuser said:

      Ich geh im Urwald so für mich hin.
      Wie schön, dass ich im Urwald bin:
      Man kann hier noch so lange wandern,
      ein Urbaum steht neben dem andern.
      Und an den Bäumen, Blatt für Blatt,
      hängt Urlaub. Schön, dass man ihn hat!
      (Heinz Erhardt)

      azuby

      posted in Deutsch
      A
      azuby
    • 1
    • 2
    • 3
    • 4
    • 5
    • 15
    • 16
    • 3 / 16