|
Sweet Home 3D Forum » List all forums » » Forum: Features use and tips » » » Thread: setSelectedLevel gives an Error |
|
| Print at Dec 24, 2025, 8:23:19 AM | View all posts in this thread on one page |
| Posted by PacWood at Apr 11, 2018, 7:42:07 AM |
|
setSelectedLevel gives an Error Hello, I am attempting to select a level in a building via the API. Below is a snippet of code that successfully runs until the last line is reached. At the line: A javascript error occurs, which is: However, the code prints the object 'objLevel' I can see in the console log, the object 'objLevel' shows there is a function named "getElevation". Does anyone have an idea why there is an error of "getElevation is not a function" and yet there is a function named "getElevation" in the object that is being passed to HOME.setSelectedLevel() ? Below is a screen shot of the console output. thank you for your help. |
| Posted by Puybaret at Apr 11, 2018, 11:07:21 AM |
|
Re: setSelectedLevel gives an Error Sorry, the JSDoc of setSelectedLevel isn't clear and will be fixed in the next version. setSelectedLevel takes only one parameter: HOME.setSelectedLevel(objLevel);---------------------------------------- Emmanuel Puybaret, Sweet Home 3D creator |
| Posted by PacWood at Apr 11, 2018, 4:38:54 PM |
|
Re: setSelectedLevel gives an Error Thank you very much for your help and example code. The program works now. |
|
|
Current timezone is GMT Dec 24, 2025, 8:23:19 AM |