☆Google SketchUp & Delphi
#Rubyのコードです。 def myScript #四角形を作成 depth = 30.mm width = 60.mm model = Sketchup.active_model entities = model.active_entities pts = [] pts[0] = [0, 0, 0] pts[1] = [width, 0, 0] pts[2] = [width, depth, 0] pts[3] = [0, depth, 0] face = entities.add_face pts boundingbox = face.bounds endいろいろ調べてみると、Delphiで作成したDLLの手続き(関数)をRubyスクリプトから呼び出すサンプルがありました。 これを使うとDelphiで入力と計算を行い、その結果をRubyスクリプトで描画させるというスタイルが可能なようです。
Google Sketchup Delphi Integration
http://www.delphigl.com/forum/viewtopic.php?t=7161
Ruby Tutorial - Dialog Boxes and WIN32API (Advanced)
http://www.suwiki.org/suwiki/index.php?title=Ruby_Tutorial_-_Dialog_Boxes_and_WIN32API_(Advanced)
| 固定リンク