/* SCM_GRPL (SCM) -- SCM Group Load Action */ /* SCM_GRPL (SCM) -- SCM Gruppeladeaktion */ /* -- EXECUTED AFTER GROUP LOAD -- */ /* // Copyright (c) 2008-2013 Bartels System GmbH, Muenchen // Author: Roman Ludwig // Changes History: // rl (131029) RELEASED FOR BAE V8.0. // rl (120427) RELEASED FOR BAE V7.8. // rl (101019) RELEASED FOR BAE V7.6. // rl (091021) RELEASED FOR BAE V7.4. // rl (081014) RELEASED FOR BAE V7.2. // rl (080515) ORIGINAL CODING. // // DESCRIPTION // // The scm_grpl User Language program is automatically activated after // a group is loaded to update the symbol variant attributes. */ // Includes #include "pop.ulh" // User Language popup utilities #include "scm.ulh" // User Language SCM utilities // Disable undo state request #pragma ULCALLERNOUNDO // INI file parameter name definitions #define PAR_VARATTRCHK "VARATTRCHK_SCM"// Variant attribute check flag #define PAR_GRPLPROG "GRPLPROG_SCM" // User def. group load program name // Messages string UPRVDCONF = M("Variantenabhaengige Attribute und/oder Plotsichtbarkeiten gefunden. Loeschen?", "Found variant dependant attributes/plot visibilities. Delete ?"); // Globals static string grplprog = bae_inistrval(PAR_GRPLPROG,"") /* Group load done program call */; // Main program void main() { // Check if variant attribute processing if (bae_planddbclass()==DDBCLSCM && bae_iniintval(PAR_VARATTRCHK,1)) varattrcheck(); // Check if extra user specific ULC program call requested if (grplprog!="") ulsystem(grplprog,0); } void varattrcheck() // Check for variant attributes in loaded group { index C_FIGURE fig /* Figure list index */; index C_CONSEG conseg /* Connection segment index */; index C_NREF nref /* Named reference index */; index C_ATTRIBUTE attr /* Attribute index */; string symname /* Symbol name */; STRINGS rl /* Rule list */; int rn /* Rule count */; STRINGS al /* Attribute name list */; int an /* Attribute name count */; string pprefix /* Plot visibility rule prefix */; int plen /* Plot vis. rule prefix length */; int varafound = 0 /* Variant attribute data found flag */; int varpfound = 0 /* Variant plot vis. data found flag */; int i /* Loop control variable */; // Scan for variant attributes forall (fig where fig.GROUP && fig.TYP==C_FIGNREF) { nref=fig.NREF; if (nref.MACRO.CLASS==DDBCLSLAB) continue; forall (attr of nref) if (attr.NAME[strlen(attr.NAME)-1]=='\003') { varafound=1; break; } } // Scan for variant plot visibility flags sprintf(pprefix,":%s:%s",RS_SCMSUBJ,RS_VARPLOTDIS); plen=strlen(pprefix); forall (fig where fig.GROUP && fig.TYP!=C_FIGCON && fig.RULEOBJID>=0 && (rn=rsc_getfigrules(fig,rl))>0) for (i=0;i=0 && (rn=rsc_getconrules(conseg,rl))>0) for (i=0;i=0 && (rn=rsc_getfigrules(fig,rl))>0) { varpfound=0; for (i=0;i=0 && (rn=rsc_getconrules(conseg,rl))>0) { varpfound=0; for (i=0;i