Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ruby/20.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby Arc的动态组件属性';素描_Ruby_Sketchup - Fatal编程技术网

Ruby Arc的动态组件属性';素描

Ruby Arc的动态组件属性';素描,ruby,sketchup,Ruby,Sketchup,我的画中有一个三点弧。标准中提供的动态属性与矩形相同。有没有办法将这3个点定义为属性,以便以后能够动态更改它们?您可以使用附加到每个实体和模型的属性来存储自定义属性 dictname = "TestDictionary" key = "arcs" value = ["x", "y", "z"] model = Sketchup.active_model model.set_attribute dictname, key, value dict = model.attribute_diction

我的画中有一个三点弧。标准中提供的动态属性与矩形相同。有没有办法将这3个点定义为属性,以便以后能够动态更改它们?

您可以使用附加到每个
实体和
模型的属性来存储自定义属性

dictname = "TestDictionary"
key = "arcs"
value = ["x", "y", "z"]
model = Sketchup.active_model
model.set_attribute dictname, key, value

dict = model.attribute_dictionary dictname
arcs = dict[key]

// or

arcs = model.get_attribute dictname, key