remote and control seat is not seen as IMyFuntionalblock,
Outdated
I use this code to add a "itemname" to every Terminal block. only the RemoteControl wil not add "itemname" to its name.
why can a remote and control seat not be turn off?
List<IMyTerminalBlock> listl = new List<IMyTerminalBlock >();
GridTerminalSystem.GetBlocksOfType<IMyFunctionalBlock >(listl);
for(int i = 0;i < listl.Count;i++){
IMyFunctionalBlock term = listl as IMyFunctionalBlock;
if(arg.Contains("instal")){
if(!term.CustomName.Contains(itemname) ){
term.CustomName =(itemname+term.CustomName);
Echo (term+" installed");
}}
if(arg.Contains("uninstal")){
if(term.CustomName.Contains(itemname) ){
term.CustomName = (term.CustomName.Replace (itemname,""));
Echo (term+" uninstalled");
}}}
You are looking up IMyFunctionalBlocks. Remote control does not have that interface so won't be found this way.
You are looking up IMyFunctionalBlocks. Remote control does not have that interface so won't be found this way.
If you are trying to tag all terminal blocks, then maybe do this instead:
That way you can also modify blocks that aren't part of the IMyFunctionalBlock family
If you are trying to tag all terminal blocks, then maybe do this instead:
That way you can also modify blocks that aren't part of the IMyFunctionalBlock family
Hello, Engineer!
Thank you for your feedback! Your topic has been added between considered issues.
Please keep voting for the issue as it will help us to identify the most serious bugs.
We really appreciate your patience.
Kind Regards
Keen Software House: QA Department
Hello, Engineer!
Thank you for your feedback! Your topic has been added between considered issues.
Please keep voting for the issue as it will help us to identify the most serious bugs.
We really appreciate your patience.
Kind Regards
Keen Software House: QA Department
Replies have been locked on this page!