Hello J-Link Gurus,
I am having trouble getting an application to delete certain layers from a model to work.
I can add layers no problem, "ModelName.CreateLayer("_PLANES");" ,
but cannot query the model properly to list all of the existing layers and then delete the unwanted layers.
I am using Eclipse as my IDE and it throws an error when I try to get a listing of the existing layers in the model.
What I am trying to do is get the existing layer names out of the model, which is called "ModelName".
Find out if any of the layers have a certain name, if so delete these layers from the model.
A snippet of the code from the app which is not working is below:
" ModelItems listModItems = ModelName.ListItems(null);
Layers existing_layers = listModItems(ModelItemType._ITEM_LAYER);(Throws an error with this)
String listOfLayers = null;
for (int k=0; k<listmoditems.getarraysize();k++){<br/> listOfLayers = listModItems.get(k).GetName().toString();
}"
It doesn't like the "listModItems(ModelItemType._ITEM_LAYER);" part
I've tried "Layers" instead of "ModelItems" , I've actually tried a lot of different things but to no avail.
If anyone can point out where I am going wrong and provide an example of what I should be doing, I would be eternally grateful as
I cannot find any examples anywhere on the net.
Please excuse my lack of Java/J-Link skills.
TIA
Paul Stephens
Kenworth Trucks Australia
WF2 M190, Intralink 3.3 M021, Eclipse 3.3.0