- This topic has 9 replies, 2 voices, and was last updated 5 years, 3 months ago by
Yuri Kovelenov.
-
AuthorPosts
-
2020-09-09 at 12:12 pm #32627
derekwang0605
CustomerSuppose I will add several buttons to call the collections in the scene.
puzzle vs. runcode()
Can puzzle and runcode() realize the same programming functions?2020-09-09 at 1:30 pm #32628
Yuri KovelenovStaffYes, under the hood the Puzzles are converted to JavaScript.
You can read more about it here: https://www.soft8soft.com/docs/manual/en/introduction/Using-JavaScript.html
2020-09-10 at 4:38 am #32644derekwang0605
CustomerThanks! Where to add ‘exec script’ after setting variables and procedures? Can not find this option in puzzles.
It is a big house and I have 120 collections whose names categorized with ‘AXXX’,’DXXX’,’FXXX’,’TXXX’. I want to add four buttons ‘A’/’D’/’F’/’T’ to show or hide the corresponding collections. Can this be done by puzzle?2020-09-10 at 6:39 am #32654
Yuri KovelenovStaff2020-09-10 at 6:46 am #32655derekwang0605
CustomerThanks for that! Also how to add button and listener in runCode(). Any examples available?
2020-09-10 at 9:53 am #32663
Yuri KovelenovStaff2020-09-11 at 12:59 am #32708derekwang0605
Customer// utility function envoked by almost all V3D-specific puzzles
// retrieve all objects on the scene
function getAllObjectNames() {
var objNameList = [];
appInstance.scene.traverse(function(obj) {
if (notIgnoredObj(obj))
objNameList.push(obj.name)
});
return objNameList;
}
This is the code script for getAllObjectNames().
Is there a function which can getAllGroups() in puzzle?2020-09-11 at 4:17 am #32712
Yuri KovelenovStaff2020-09-14 at 1:25 am #32817derekwang0605
CustomerThanks it works but get group name retrieved by objects and then removed the repeated groups in the group list. It is a bit time consuming and if there is a better way to retrieve the group list from scene, will be better.
2020-09-14 at 7:26 am #32831
Yuri KovelenovStaff -
AuthorPosts
- You must be logged in to reply to this topic.
