How can import and locate the components by ruby script?
-
Everyboby ,I want to have the method relating to import and location of the components.Please give me help .Thanks!
-
Use the
.load
or.load_from_url
methods from the DefinitionList to import components to the model. http://code.google.com/intl/nb/apis/sketchup/docs/ourdoc/definitionlist.htmlDepending how you want to add the component, use either
entities.add_instance
http://code.google.com/intl/nb/apis/sketchup/docs/ourdoc/entities.html#add_instance ormodel.place_component
http://code.google.com/intl/nb/apis/sketchup/docs/ourdoc/model.html#place_component -
If you want to get the path a component was loaded from use the
.path
method for the definition. http://code.google.com/intl/nb/apis/sketchup/docs/ourdoc/componentdefinition.html#path -
The information is vrey important .And I want to import some components into coordinates by ruby scripts and locate the components by parameter form the user,What methods need to refer? Please give me some suggestions.Thanks!
The size of components add a lot of difficulties,because space of the components need to taken in my ruby script.Now ,I have trouble to deal with that. Does some solutions be gave?
Advertisement