Viewpoint Forums
Viewpoint Forums
VETScript
execute mtx code from VETScript|
Go
![]() |
New
![]() |
Find
![]() |
Notify
![]() |
Tools
![]() |
Reply
![]() |
|
|
Member |
hi,
Is there a way to execute mtx code from VETScript ( like we do from javascript ). something like; myMtxCode = '<instance name="" ..........>'; execute( myMtxCode ); or a better way like this myInstance = new Instance(); myInstance.name = "Rik"; .................. MTSScene.addChild( myInstance ); thank you in advance |
||
|
|
Member |
Hi,
You could use the following built in VETScript functions: - loadMTXStr(‘MTX code’) : function returns 1 if success and returns 0 if invalid XML .The returned error string will be a string describing the error if invalid MTX (like action undefined). - loadMTXFile(‘filename’) : start streaming the file and parse it when available. Regards |
|||
|
|
Member |
very thank you it works.
|
|||
|
|
Member |
hi
This work perfectly loadMTXStr('<MTSScene Version="330" ><MTSInstance Name="myCube">............</MTSScene>'); This not work loadMTXFile("myCube.mtx"); I tried to load a file with inside this mtx code: <MTSScene Version="330" > <MTSInstance Name="myCube"> <Transform> <Scale x="1" y="3" z="1" /> </Transform> <MTSGeometry Name="MTSCube_1" Type="MTSCube" /> </MTSInstance> </MTSScene> could you give me an example? |
|||
|
| Powered by Eve Community |
| Please Wait. Your request is being processed... |
|
Viewpoint Forums
Viewpoint Forums
VETScript
execute mtx code from VETScript
