painaz
Guest
we imagine having this starting situation:
with this list parts:
now geared the big toothed wheel:
I would like to write a macro that flows the list parts, locates the part with the same daughter name of the front1 view
and the aggregate obtaining this result:
now the macro would have written it, to reread it should work, instead it fails:
define unified
local line_tabella
local name_parte_current
local id_parte_current
local name_part_confront
local id_parte_confrontolocal list_parti
edit_part '.
inq
le nome_parte_current (inq 301)
le nome_parte_current (trim name_parte_current)
le nome_parte_current (substr name_parte_current 1 8)
inq
(inq 302)
(ii)
pb_ltab_update
le list_parti 'pbt_ltab'
let line_tabella 1
loop
le linea_tabella (riga_tabella+1)
exit_if (rega_tabella>(ltab_rows list_parts))
let name_part_comparison (read_ltab list_parts line_tabella 1)
let name_part_comparison (trim name_part_confront)
le nome_parte_confronto (substr name_parte_confronto 1 8)
le id_parte_confronto (read_ltab list_parti riga_tabella 2)
(iii)
if (id_parte_current < id_part_face)
if (name_part_current = name_part_confront)
edit_part top
gather id_parte_confront
edit_part id_parte_current
gather id_parte_confront
smash_subpart id_part_confront
pb_ltab_update
le list_parti 'pbt_ltab'
♪
♪
let line_tabella (rega_tabella + 1)
end_loop
end
end
edit_part top
end
if someone has suggestions....
with this list parts:
now geared the big toothed wheel:
I would like to write a macro that flows the list parts, locates the part with the same daughter name of the front1 viewand the aggregate obtaining this result:
now the macro would have written it, to reread it should work, instead it fails:define unified
local line_tabella
local name_parte_current
local id_parte_current
local name_part_confront
local id_parte_confrontolocal list_parti
edit_part '.
inq
le nome_parte_current (inq 301)
le nome_parte_current (trim name_parte_current)
le nome_parte_current (substr name_parte_current 1 8)
inq
(inq 302)
(ii)
pb_ltab_update
le list_parti 'pbt_ltab'
let line_tabella 1
loop
le linea_tabella (riga_tabella+1)
exit_if (rega_tabella>(ltab_rows list_parts))
let name_part_comparison (read_ltab list_parts line_tabella 1)
let name_part_comparison (trim name_part_confront)
le nome_parte_confronto (substr name_parte_confronto 1 8)
le id_parte_confronto (read_ltab list_parti riga_tabella 2)
(iii)
if (id_parte_current < id_part_face)
if (name_part_current = name_part_confront)
edit_part top
gather id_parte_confront
edit_part id_parte_current
gather id_parte_confront
smash_subpart id_part_confront
pb_ltab_update
le list_parti 'pbt_ltab'
♪
♪
let line_tabella (rega_tabella + 1)
end_loop
end
end
edit_part top
end
if someone has suggestions....