Viewpoint Forums
Viewpoint Forums
VETScript
MTSBaseComponent.RemoveObject|
Go
![]() |
New
![]() |
Find
![]() |
Notify
![]() |
Tools
![]() |
Reply
![]() |
|
|
Member |
Hi
Here is the my problem: I have an instance into the scene. I want to remove it and after ,via loadMTXStr, change some xml node and put it again into the scene. I've tried this: MTSBaseComponent.RemoveObject( "myInstanceName" ); loadMTXStr( '<MTSInstance Name="myInstanceName">........</MTSInstance>' ); But it seems to execute removeObject after loadMTXStr can you help me to resolve the question? |
||
|
|
Member |
Hi Rik,
I would place the calls to both these actions in an animator to make absolutely sure one gets called before the other. Let me know if you need more info. |
|||
|
|
Member |
Hi,
I solved the problem using: function draw(){ loadMTXStr( ...... ); } setTimeout("draw()",500); but I'm not sure that is a right way ( is a litle strange ) maybe RemoveObject function is an independent task. |
|||
|
|
Member |
Sounds like a bug, are you using the RemoveObject VETDispatch xml call? You should probably try to do this in an action in the mtx, one after the other.
|
|||
|
|
Member |
I will try to look into this... perhaps we can add an event to handle when remove object is done so you don't have to set a timer. In the meantime, perhaps you're timer should instead loop and check to see if the removed object node is null or undefined before loading the new node.
|
|||
|
|
Member |
Hi
I've strange result with: MTSBaseComponent.RemoveObjectAndDependencies( myInstance); MTSBaseComponent.RemoveObject( myInstance); and <MTSAction Name="deleteInstance" Type="Script" > <VETDispatchCall Function="MTSBaseComponent::RemoveObjectAndDependencies( myInstance)"/> </MTSAction> I want to delete different instances at the same time using more calls to the RemoveObjectAndDependencies function So I wait 1 second to redraw updated instances but sometime, in a random way, some instances is drawed and others not thanks a lot for your help |
|||
|
| Powered by Eve Community |
| Please Wait. Your request is being processed... |
|
Viewpoint Forums
Viewpoint Forums
VETScript
MTSBaseComponent.RemoveObject
