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

Check_completeness without warning message

unknown1
1-Newbie

Check_completeness without warning message



Hello,







I would like to perform a check_completeness on a
file, currently opened in the edit window, and write the result in an external
file but without error message constraining me to click on the OK button when
context errors are detected.




I tried all these command :



<span<br/>lang=EN-GB style='font-size:10.0pt;font-family:"Courier New">set
contextrules=off;




<span<br/>lang=EN-GB style='font-size:10.0pt;font-family:"Courier New">set
contextwarnings=off;




<span<br/>lang=EN-GB style='font-size:10.0pt;font-family:"Courier New">set
gentextwarnings=0;




<span<br/>lang=EN-GB style='font-size:10.0pt;font-family:"Courier New">set
dialogdisplay=off;




<span<br/>lang=EN-GB style='font-size:10.0pt;font-family:"Courier New">set
documenttypewarnings=off;




without success.







Any idea ?







About the adepters list change, I can’t have
any access to the Web from my PC and I think security of my enterprise will
never let me have RSS feed, Defense sector is quite protected.












<font<br/> size=2 face=Arial>Systèmes d'Information Logistique



MBDA France



20-22 rue Grange Dame Rose



78141 Vélizy-Villacoublay CEDEX



tél. : 01.34.88.16.53



mail : yves.deniard@mbda.fr







2 REPLIES 2

The
execute() function is the trick. Please read through before trying.
You

may
wish to modify some of the function's behavior. Enjoy.


# Logs
the completeness check results for the document of the given ID
# to the
specified filename. Only logs results if there are completeness
# errors. In
such a case, 1 is returned when successful. 0 means no
# completeness errors
or error encountered. This function will attempt
# to first delete the
specified file (without the "r" and "f" flags).
function
LogCompletenessCheck( doc, logFilename )
{
local logged
= 0;


# Change doc focus
local
savedDoc = current_doc();
if ( savedDoc != doc
)
{

current_doc( doc );
}


local win = doc_window( doc ); # used
below


# May wishto remove this check, always logging
results.
if ( doc_incomplete( doc )
)
{
# Avoid
overwrite file prompt by first
deletingspecified
# log
file.
if ( file_size( logFilename
) != -1 )

{
remove_file
"$logFilename";

}


# Direct completeness check
results to given filename.
local
cmd = "cc -full output=" . logFilename .
";
execute( cmd ); # ignore
return, see below.


# Consider operation
successful if file now exists. The

# execute() is returning 1 even when operation is

#
successful.
logged = ( file_size(
logFilename ) != -1 );


#Update user;
alternatively, set message to " " clearing cc's

# message.class=335314513-13072006>
if ( win >= 0
)

{
if (
logged )

{

window_set( win, "message",
\

"Completeness results logged to "$logFilename"."
);

}

else

{

if ( length( main::ERROR )
)

{

window_set( win, "message", main::ERROR
);

}

else

{

window_set( win, "message",
\

"Failed to log completeness results to "$logFilename"."
);

}

}
}

}
else

{
if ( win >= 0
)

{
window_set( win,
"message", "No completeness errors to
log.");
}

}


# Restore doc focus
if (
savedDoc != current_doc() )

{
current_doc( savedDoc
);
}


return logged;
}



<br /><br />Many thanks, Brent. That’s<br />OK.<br /><br /><br /><br />The function &lt;font&lt;br/&gt;size=2 color=blue face=Arial&gt;LogCompletenessCheck is to much but the execute<br />function is exactly what I need.<br /><br /><br /><br /><br /><br /><br /><br /> <br /><br />&lt;font&lt;br/&gt; size=2 color=navy face=Arial&gt;Yves DENIARD<br /><br /><br /><br />Systèmes d'Information Logistique&lt;font&lt;br/&gt;color=navy&gt;<br /><br /><br /><br />MBDA France&lt;span&lt;br/&gt;style='color:navy'&gt;<br /><br /><br /><br />20-22 rue Grange Dame Rose&lt;font&lt;br/&gt;color=navy&gt;<br /><br /><br /><br />78141 Vélizy-Villacoublay CEDEX&lt;font&lt;br/&gt;color=navy&gt;<br /><br /><br /><br />tél. : 01.34.88.16.53&lt;font&lt;br/&gt;color=navy&gt;<br /><br /><br /><br />mail : &lt;a&lt;br/&gt;href="mailto:yves.deniard@mbda.fr"&gt;yves.deniard@mbda.fr<br /><br /><br /><br /> <br /><br /> <br /><br /><br /><br /><br /><br /> <br /><br />De:<br />Brent.Hartwig@thomson.com <br /><br />Envoyé: jeudi 13 juillet<br />2006 16:18<br /><br />À: adepters@arbortext.com<br /><br />Cc: DENIARD.Yves<br /><br />Objet: RE:<br />Check_completeness without warning message<br /><br /><br /><br /> <br /><br /><br /><br /><br /><br /> <br /><br />The execute() function is the trick.<br />Please read through before trying. You<br /><br /><br /><br /> <br /><br /> <br /><br />may wish to modify some of the function's<br />behavior. Enjoy.<br /><br /><br /><br /> <br /><br /> <br /><br /><br /><br /><br /><br /> <br /><br /> <br /><br /># Logs the completeness check results for<br />the document of the given ID<br /><br /># to the specified filename. Only logs results if there are completeness<br /><br /># errors. In such a case, 1 is returned when successful. 0 means no <br /><br /># completeness errors or error encountered. This function will attempt<br /><br /># to first delete the specified file (without the "r" and<br />"f" flags).<br /><br />function LogCompletenessCheck( doc, logFilename )<br /><br />{<br /><br /> local logged = 0;<br /><br /><br /><br /> <br /><br /> <br /><br /><br /><br /><br /><br /> <br /><br /> <br /><br /> # Change doc focus<br /><br /> local savedDoc = current_doc();<br /><br /> if ( savedDoc != doc )<br /><br /> {<br /><br /> current_doc( doc );<br /><br /> }<br /><br /><br /><br /> <br /><br /> <br /><br /><br /><br /><br /><br /> <br /><br /> <br /><br /> local win = doc_window(<br />doc ); # used below<br /><br /><br /><br /> <br /><br /> <br /><br /><br /><br /><br /><br /> <br /><br /> <br /><br /> # May wishto<br />remove this check, always logging results.<br /><br /> if ( doc_incomplete( doc ) )<br /><br /> {<br /><br /> # Avoid overwrite file prompt by<br />first deletingspecified<br /><br /> # log file.<br /><br /> if ( file_size( logFilename ) != -1<br />) <br /><br /> {<br /><br /> remove_file<br />"$logFilename";<br /><br /> }<br /><br /><br /><br /> <br /><br /> <br /><br /><br /><br /><br /><br /> <br /><br /> <br /><br /><br /># Direct completeness check results to given filename.<br /><br /> local cmd = "cc -full<br />output=" . logFilename . ";<br /><br /> execute( cmd ); # ignore return, see<br />below.<br /><br /><br /><br /> <br /><br /> <br /><br /><br /><br /><br /><br /> <br /><br /> <br /><br /><br /># Consider operation successful if file now exists. The<br /><br /> # execute() is returning 1 even when<br />operation is <br /><br /> # successful.<br /><br /> logged = ( file_size( logFilename )<br />!= -1 );<br /><br /><br /><br /> <br /><br /> <br /><br /><br /><br /><br /><br /> <br /><br /> <br /><br /><br />#Update user; alternatively, set message to " " clearing cc's<br /><br /><br /><br /> <br /><br /> <br /><br /><br /># message.<br /><br /> if ( win &gt;= 0 )<br /><br /> {<br /><br /> if ( logged<br />)<br /><br /> {<br /><br /><br />window_set( win, "message", \<br /><br /><br />"Completeness results logged to \"$logFilename\"." );<br /><br /> }<br /><br /> else<br /><br /> {<br /><br /><br />if ( length( main::ERROR ) )<br /><br /><br />{<br /><br /><br />window_set( win, "message", main::ERROR );<br /><br /><br />}<br /><br /><br />else<br /><br /><br />{<br /><br /><br />window_set( win, "message", \<br /><br /><br />"Failed to log completeness results to \"$logFilename\"."<br />);<br /><br /><br />}<br /><br /> }<br /><br /> }<br /><br /> }<br /><br /> else<br /><br /> {<br /><br /> if ( win &gt;= 0 )<br /><br /> {<br /><br /> window_set( win,<br />"message", "No completeness errors to log.");<br /><br /> }<br /><br /> }<br /><br /><br /><br /> <br /><br /> <br /><br /><br /><br /><br /><br /> <br /><br /> <br /><br /> # Restore doc focus<br /><br /> if ( savedDoc != current_doc() )<br /><br /> {<br /><br /> current_doc( savedDoc );<br /><br /> }<br /><br /><br /><br /> <br /><br /> <br /><br /><br /><br /><br /><br /> <br /><br /> <br /><br /> return logged;<br /><br />}<br /><br /><br /><br /> <br /><br /> <br /><br /><br /><br /><br /><br /> <br /><br /><br /><br />&lt;span&lt;br/&gt;style='font-size:10.0pt;font-family:Tahoma'

Announcements