In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
Today, the editor will take you to understand how to write SketchUp's api documents. The knowledge points in the article are introduced in great detail. Friends who think it is helpful can browse the content of the article together with the editor, hoping to help more friends who want to solve this problem to find the answer to the problem. Let's follow the editor to learn more about how to write SketchUp api documents.
There are users asking for help in the MixLab group. The key to the code about casts_shadows is to correctly understand how to write the api document of SketchUp:
1. = > indicates the returned value
# casts_shadows? ⇒ Boolean
2. = (casts) indicates the parameter to be passed into casts_shadows
# casts_shadows= (casts) ⇒ Boolean
This involves methods that end with an equal sign in the ruby language. In ruby, methods that end with an equal sign are special. Ruby allows them to be called in the syntax of an assignment operation. Practice:
# define a class, and the mixLab class has the method name=, to set the name property of the class.
Class mixLab def name= (aName) @ name= aName endendm= mixLab.new ()
# equivalent writing method m shadow' mixLab.newm.name = ('shadow') p m # equivalent writing method m.name =' shadow' p m
Ps: P is an abbreviation for puts.
Go back and practice the code related to cast_shadows:
Model = Sketchup.active_modelselections = model.selectionputs selections [0] .typenameselections [0] .casts _ shadows=true
Status= (selections [0] .casts _ shadows=false) # p is short for puts p selections [0] .casts _ shadows?
A short exercise to understand the end of the ruby equal sign ~
Thank you for your reading, the above is the whole content of "what is the writing of SketchUp api documents?" learn friends to hurry up to operate it. I believe that the editor will certainly bring you better quality articles. Thank you for your support to the website!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.