cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X

Select multiple elements to delete

bfriesen
16-Pearl

Select multiple elements to delete

Hello, I have a table that that has a column of indexterm elements that I would like to delete. How can I select all of the indexterm elements and delete them?

 

Bryon 

2 REPLIES 2

Tried this and it seems to work, only it does not delete anything within the tags.

 

Bryon

 

function remove_indexterm_tags()
{
local oid = oid_first_tag()
local cnt
local i = 1

cnt = oid_find_children(oid, $arr, "indexterm")
for ($i=1; $i<=$cnt; $i+=1)
{
if (oid_name(oid_parent($arr[$i])) == "entry")
{
goto_oid($arr[$i],-1)
dt
}
}
}
map F1 remove_indexterm_tags();

Instead of goto_oid() and dt, try using this instead:

oid_delete($arr[$i]);
Top Tags