1

我正在用 ruby​​ 开发一个sketchup插件,我已经成功地编写了解析过程,并且我将 cpoints 从 csv 文件获取到了sketchup。csv 文件还包含每个点的坐标内的描述,例如:["15461.545", "845152.56", "5464.59", "tower1"]。我想获得与tower1每个点相关联的文本。

我怎样才能做到这一点 ?

PS:您不需要tower1从数组中获取,我已经这样做了。我现在将它放在一个独立变量中,例如: desc_array = ["tower1", "beacon48", "anna55", ...]

请帮我

4

1 回答 1

0

I did that by

@@todraw_su.each do |todraw|

@@desc_array.each do |desc|

@model.entities.add_text desc, todraw

end

end

But I found a problem with each statement, it loops for every todraw in desc
If you know how I can do it, answer on this question Each statement inside another each malfunctions?

于 2013-02-07T15:33:53.187 回答