2
要素を処理するには、次の定義を使用します。Sketchupコンポーネント名でエンティティを取得
ref = Sketchup.active_model.entities[0]
refdef = ref.definition
Iはなく、エンティティのその名(成分名)によってentitiyを得ることができる方法は
要素を処理するには、次の定義を使用します。Sketchupコンポーネント名でエンティティを取得
ref = Sketchup.active_model.entities[0]
refdef = ref.definition
Iはなく、エンティティのその名(成分名)によってentitiyを得ることができる方法は
Sketchup.active_model.definitions
はDefinitionListを返し[0]などがあります。その[]
メソッドは、index
,GUID
またはname
によって定義にアクセスするために使用できます。
componame="MyLovelyComponent"
compo = Sketchup.active_model.definitions[componame]
if compo
puts "#{componame} found: doing something else..."
### do something with 'compo' definition
else
puts "#{componame} does NOT exist!"
return
end