private Boolean InclureExclure(Component2 cp) { if (!cp.IsSuppressed() && (eTypeDoc.Assemblage | eTypeDoc.Piece).HasFlag(cp.TypeDoc())) { if (cp.eModelDoc2().ePropExiste(_pPropExclureNomenclature.GetValeur <String>())) { int MdlIntVal = cp.eModelDoc2().eGetProp(_pPropExclureNomenclature.GetValeur <String>()).eToInteger(); switch (MdlIntVal) { case 0: { cp.ExcludeFromBOM = false; break; } case 1: { cp.ExcludeFromBOM = true; //WindowLog.Ecrire(cp.Name2 + " : Est exclu"); break; } case 2: { if (cp.ePropExiste(_pPropExclureNomenclature.GetValeur <String>())) { int CfgIntVal = cp.eProp(_pPropExclureNomenclature.GetValeur <String>()).eToInteger(); switch (CfgIntVal) { case 0: { cp.ExcludeFromBOM = false; break; } case 1: { cp.ExcludeFromBOM = true; //WindowLog.Ecrire(cp.Name2); //WindowLog.Ecrire(cp.eNomConfiguration()); //WindowLog.EcrireF("{0} \"{1}\" : Est exclu", cp.Name2, cp.eNomConfiguration()); break; } default: break; } } break; } default: break; } } } return(false); }
private String Quantite() { CustomPropertyManager PM = MdlBase.Extension.get_CustomPropertyManager(""); if (MdlBase.ePropExiste(PropQuantite.GetValeur <String>())) { return(Math.Max(MdlBase.eGetProp(PropQuantite.GetValeur <String>()).eToInteger(), 1).ToString()); } return("1"); }
private void CreerDossierExport(ModelDoc2 MdlBase) { String NomBase = NomDossierExport.GetValeur <String>(); DirectoryInfo D = new DirectoryInfo(MdlBase.eDossier()); List <String> ListeD = new List <string>(); foreach (var d in D.GetDirectories()) { if (d.Name.ToUpperInvariant().StartsWith(NomBase.ToUpperInvariant())) { ListeD.Add(d.Name); } } ListeD.Sort(new WindowsStringComparer(System.ComponentModel.ListSortDirection.Ascending)); Indice = OutilsCommun.ChercherIndice(ListeD); DossierExport = Path.Combine(MdlBase.eDossier(), NomBase + " - " + Indice); if (!Directory.Exists(DossierExport)) { Directory.CreateDirectory(DossierExport); } }
public PageDxfDwg() { try { FormatExport = _Config.AjouterParam("FormatExport", eTypeFichierExport.DWG, "Format"); VersionExport = _Config.AjouterParam("VersionExport", eDxfFormat.R2013, "Version"); UtiliserPolicesACAD = _Config.AjouterParam("UtiliserPoliceACAD", true, "Utiliser les polices AutoCAD"); UtiliserStylesACAD = _Config.AjouterParam("UtiliserStylesACAD", false, "Utiliser les styles AutoCAD"); FusionnerExtremites = _Config.AjouterParam("FusionnerExtremites", true, "Fusionner les extremités"); ToleranceFusion = _Config.AjouterParam("ToleranceFusion", 0.01, "Tolérance de fusion", "Tolérance de fusion"); ExporterHauteQualite = _Config.AjouterParam("ExporterHauteQualite", true, "Exporter en haute qualité"); ExporterFeuilleEspacePapier = _Config.AjouterParam("ExporterFeuilleEspacePapier", false, "Exporter les feuilles dans l'espace papier"); ConvertirSplineToPolyligne = _Config.AjouterParam("ConvertirSplineToPolyligne", false, "Convertir les splines en polylignes"); CheminDernierDossier = _Config.AjouterParam("CheminDernierDossier", "", "Dernier dossier utilisé"); if (CheminDernierDossier.GetValeur <String>().Contains(MdlBase.eDossier())) { MdlBase.eDrawingDoc().eSetDernierDossier(OutilsCommun.CheminRelatif(MdlBase.eDossier(), CheminDernierDossier.GetValeur <String>())); } else { MdlBase.eDrawingDoc().eSetDernierDossier(""); } OnCalque += Calque; OnRunOkCommand += RunOkCommand; } catch (Exception e) { this.LogMethode(new Object[] { e }); } }
public BoutonCommandeProfil() { ParamLongueurMax = _Config.AjouterParam("LongueurMax", 6000); LgMax = ParamLongueurMax.GetValeur <Double>(); var lg = "6000"; if (Interaction.InputBox("Lg nominale des barres", "Lg :", ref lg) == DialogResult.OK) { if (!String.IsNullOrWhiteSpace(lg) && (lg.eToDouble() != 0)) { LgMax = lg.eToDouble(); } } }
public PageEmpreinte() { PrefixeBase = _Config.AjouterParam("PrefixeBase", "", "Filtrer les prefixes (?*#):"); PrefixeEmpreinte = _Config.AjouterParam("PrefixeEmpreinte", "", "Filtrer les prefixes (?*#):"); PropEmpreinte = _Config.AjouterParam("PropEmpreinte", "Empreinte", "Propriete \"Empreinte\""); PropPrefixeEmpreinte = _Config.AjouterParam("PropPrefixeEmpreinte", "PrefixeEmpreinte", "Propriete \"PrefixeEmpreinte\""); PropTarauderEmpreinte = _Config.AjouterParam("PropTarauderEmpreinte", "TarauderEmpreinte", "Propriete \"TarauderEmpreinte\""); Empreinte.NomPropEmpreinte = PropEmpreinte.GetValeur <String>(); Empreinte.NomPropPrefixe = PropPrefixeEmpreinte.GetValeur <String>(); OnCalque += Calque; OnRunOkCommand += RunOkCommand; OnRunAfterActivation += delegate { _FiltreCompBase.AppliquerParam(); _FiltreCompEmpreinte.AppliquerParam(); }; OnRunAfterClose += RunAfterClose; }
protected Boolean SelectFace(CtrlSelectionBox SelBox, Component2 Cp, Parametre param) { if (Cp.IsNull()) { return(false); } String cFace = param.GetValeur <String>(); Face2 Face = Cp.eChercherFace(cFace); if (Face.IsRef()) { MdlBase.eSelectMulti(Face, SelBox.Marque, true); } return(true); }
protected override void Command() { try { var dossier = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); var cheminFichier = Path.Combine(dossier, NomFichierLogDebug.GetValeur <String>()); if (File.Exists(cheminFichier)) { System.Diagnostics.Process.Start(cheminFichier); } } catch (Exception e) { this.LogErreur(new Object[] { e }); } }
protected Boolean SelectEsquisse(CtrlSelectionBox SelBox, Component2 Cp, Parametre param) { if (Cp.IsNull()) { return(false); } String cEsquisseConfig = param.GetValeur <String>(); Feature Esquisse = Cp.eChercherFonction(f => { return(Regex.IsMatch(f.Name, cEsquisseConfig)); }, true); if (Esquisse.IsRef()) { MdlBase.eSelectMulti(Esquisse, SelBox.Marque, true); } return(true); }
protected Boolean SelectPlan(CtrlSelectionBox SelBox, Component2 Cp, Parametre param) { if (Cp.IsNull()) { return(false); } String cPlanContrainte = param.GetValeur <String>(); Feature Plan = Cp.eChercherFonction(f => { return(Regex.IsMatch(f.Name, cPlanContrainte)); }, false); if (Plan.IsRef()) { MdlBase.eSelectMulti(Plan, SelBox.Marque, true); } return(false); }
protected void PreSelection() { try { MdlBase.ClearSelection2(true); String cPlanEsquisse = _pPlanDessus.GetValeur <String>(); Feature P = MdlBase.eChercherFonction(f => { return(Regex.IsMatch(f.Name, cPlanEsquisse)); }, false); if (P.IsRef()) { MdlBase.eSelectMulti(P, _Select_F_Dessus.Marque, true); } } catch (Exception e) { this.LogMethode(new Object[] { e }); } }
protected override void Command() { try { var ListeVue = MdlBase.eSelect_RecupererListeObjets <View>(); if (ListeVue.IsNull() || (ListeVue.Count == 0)) { ListeVue = MdlBase.eDrawingDoc().eFeuilleActive().eListeDesVues(); } if (ListeVue.IsNull() || (ListeVue.Count == 0)) { return; } MdlBase.eEffacerSelection(); foreach (var vue in ListeVue) { var dcp = vue.RootDrawingComponent; if (dcp.IsRef()) { ParcourirDrawingComponent(MdlBase, dcp, vue, NomEsquisse.GetValeur <String>(), AfficherMasquer.GetValeur <Boolean>()); } } MdlBase.eEffacerSelection(); AfficherMasquer.SetValeur <Boolean>(!AfficherMasquer.GetValeur <Boolean>()); } catch (Exception e) { this.LogErreur(new Object[] { e }); } }
protected void PreSelection() { try { MdlBase.eEffacerSelection(); String cPlanEsquisse = PlanSymetrie.GetValeur <String>(); Feature P = MdlBase.eChercherFonction(f => { return(Regex.IsMatch(f.Name, cPlanEsquisse)); }, false); if (P.IsRef()) { MdlBase.eSelectMulti(P, _Select_P_Symetrie.Marque, true); } var ListeCorps = Piece.eListeCorps(); if (ListeCorps.Count > 0) { MdlBase.eSelectMulti(ListeCorps, _Select_Corps.Marque, true); } } catch (Exception e) { this.LogMethode(new Object[] { e }); } }
protected override void Command() { try { String nom = ""; var hashVuesStandard = new HashSet <String>(PropVuesStandard.GetValeur <String>().Split(',')); var listeVues = new List <String>(); foreach (String n in MdlBase.GetModelViewNames()) { if (!hashVuesStandard.Contains(n)) { listeVues.Add(n); } } if (listeVues.Count == 0) { listeVues.Add("Aucunes"); } String VuesExistantes = "Vues existantes : " + String.Join(", ", listeVues); if (Interaction.InputBox("Enregistrer la vue", VuesExistantes, ref nom) == DialogResult.OK) { if (!String.IsNullOrWhiteSpace(nom) || !nom.StartsWith("*")) { MdlBase.DeleteNamedView(nom); MdlBase.NameView(nom); } } } catch (Exception e) { this.LogErreur(new Object[] { e }); } }
protected void Calque() { try { Groupe G; G = _Calque.AjouterGroupe("Appliquer"); _CheckBox_ToutesLesConfig = G.AjouterCheckBox(pToutesLesConfig); _CheckBox_EnregistrerSelection = G.AjouterCheckBox("Enregistrer les selections"); _Button_Preselection = G.AjouterBouton("Preselectionner"); _Button_Preselection.OnButtonPress += delegate(object sender) { PreSelection(); }; G = _Calque.AjouterGroupe("Face du dessus" + " ( " + pFaceDessus.GetValeur <String>() + "@" + pMarche.GetValeur <String>() + " )"); _Select_F_Dessus = G.AjouterSelectionBox("Selectionnez la face du dessus"); _Select_F_Dessus.SelectionMultipleMemeEntite = false; _Select_F_Dessus.SelectionDansMultipleBox = false; _Select_F_Dessus.UneSeuleEntite = true; _Select_F_Dessus.FiltreSelection(swSelectType_e.swSelFACES); _Select_F_Dessus.OnSubmitSelection += delegate(Object SelBox, Object selection, int selType, String itemText) { return(FiltreFace((CtrlSelectionBox)SelBox, selection, selType, pFaceDessus)); }; _Select_F_Dessus.OnApplyOnSelection += delegate(Object Box) { SvgNomComposant(Box, pMarche); }; G = _Calque.AjouterGroupe("Face de devant" + " ( " + pFaceDevant.GetValeur <String>() + "@" + pMarche.GetValeur <String>() + " )"); _Select_F_Devant = G.AjouterSelectionBox("Selectionnez la face de devant"); _Select_F_Devant.SelectionMultipleMemeEntite = false; _Select_F_Devant.SelectionDansMultipleBox = false; _Select_F_Devant.UneSeuleEntite = true; _Select_F_Devant.FiltreSelection(swSelectType_e.swSelFACES); _Select_F_Devant.OnSubmitSelection += delegate(Object SelBox, Object selection, int selType, String itemText) { return(FiltreFace((CtrlSelectionBox)SelBox, selection, selType, pFaceDevant)); }; _Select_F_Devant.OnApplyOnSelection += delegate(Object Box) { SvgNomComposant(Box, pMarche); }; _Select_F_Dessus.OnApplyOnSelection += _Select_F_Devant.GainedFocus; G = _Calque.AjouterGroupe("Contremarche" + " ( " + pNomEsquisse.GetValeur <String>() + "@" + pEsquisse.GetValeur <String>() + " )"); _Select_ContreMarche_Esquisse = G.AjouterSelectionBox("Selectionnez l'esquisse à configurer", "Esquisse à configurer"); _Select_ContreMarche_Esquisse.SelectionMultipleMemeEntite = false; _Select_ContreMarche_Esquisse.SelectionDansMultipleBox = false; _Select_ContreMarche_Esquisse.UneSeuleEntite = true; _Select_ContreMarche_Esquisse.FiltreSelection(swSelectType_e.swSelSKETCHES, swSelectType_e.swSelCOMPONENTS); _Select_ContreMarche_Esquisse.OnSubmitSelection += delegate(Object SelBox, Object selection, int selType, String itemText) { return(FiltreEsquisse((CtrlSelectionBox)SelBox, selection, selType, pNomEsquisse)); }; _Select_ContreMarche_Esquisse.OnApplyOnSelection += delegate(Object Box) { SvgNomComposant(Box, pEsquisse); }; _Select_ContreMarche_Esquisse.OnApplyOnSelection += delegate(Object Box) { SvgNomFonction(Box, pNomEsquisse); }; _Select_F_Devant.OnApplyOnSelection += _Select_ContreMarche_Esquisse.GainedFocus; //G = _Calque.AjouterGroupe("Options"); //_Text_NomEsquisse = G.AjouterTexteBox(_Config.GetParam("NomEsquisse")); } catch (Exception e) { this.LogMethode(new Object[] { e }); } }
protected void Calque() { try { Groupe G; G = _Calque.AjouterGroupe("Appliquer"); _CheckBox_EnregistrerSelection = G.AjouterCheckBox("Enregistrer les selections"); _Button_Preselection = G.AjouterBouton("Preselectionner"); _Button_Preselection.OnButtonPress += delegate(object sender) { PreSelection(); }; G = _Calque.AjouterGroupe("Marche" + " ( " + _pMarche.GetValeur <String>() + " )"); _Select_Marche = G.AjouterSelectionBox("", "Selectionnez la marche"); _Select_Marche.SelectionMultipleMemeEntite = false; _Select_Marche.SelectionDansMultipleBox = false; _Select_Marche.UneSeuleEntite = true; _Select_Marche.FiltreSelection(swSelectType_e.swSelCOMPONENTS, swSelectType_e.swSelFACES); _Select_Marche.OnSubmitSelection += FiltreMarche; _Select_Marche.OnApplyOnSelection += delegate(Object Box) { SvgNomComposant(Box, _pMarche); }; _Select_Marche.OnSelectionChanged += EffacerContraintes; G = _Calque.AjouterGroupe("Fonction de répetition"); _Select_FonctionRepet = G.AjouterSelectionBox("Fonction" + " ( " + _pFonctionRepet.GetValeur <String>() + "@" + _pPieceRepet.GetValeur <String>() + " )", "Selectionnez le plan"); _Select_FonctionRepet.SelectionMultipleMemeEntite = false; _Select_FonctionRepet.SelectionDansMultipleBox = false; _Select_FonctionRepet.UneSeuleEntite = true; _Select_FonctionRepet.FiltreSelection(new List <swSelectType_e>() { swSelectType_e.swSelBODYFEATURES, swSelectType_e.swSelFACES }); _Select_FonctionRepet.OnSubmitSelection += FiltreFonctionRepetition; _Select_FonctionRepet.OnSelectionChanged += EffacerContraintes; // Svg des parametres _Select_FonctionRepet.OnApplyOnSelection += delegate(Object Box) { SvgNomComposant(Box, _pPieceRepet); }; _Select_FonctionRepet.OnApplyOnSelection += delegate(Object Box) { SvgNomFonction(Box, _pFonctionRepet); }; _Select_Marche.OnApplyOnSelection += _Select_FonctionRepet.GainedFocus; G = _Calque.AjouterGroupe("Contrainte point"); _Select_Contraintes_PointCorps = G.AjouterSelectionBox("Point sur le corps"); _Select_Contraintes_PointCorps.SelectionMultipleMemeEntite = false; _Select_Contraintes_PointCorps.SelectionDansMultipleBox = false; _Select_Contraintes_PointCorps.UneSeuleEntite = true; _Select_Contraintes_PointCorps.FiltreSelection(swSelectType_e.swSelVERTICES); _Select_Contraintes_PointMarche = G.AjouterSelectionBox("Point dans la marche"); _Select_Contraintes_PointMarche.SelectionMultipleMemeEntite = false; _Select_Contraintes_PointMarche.SelectionDansMultipleBox = false; _Select_Contraintes_PointMarche.UneSeuleEntite = true; _Select_Contraintes_PointMarche.FiltreSelection(swSelectType_e.swSelEXTSKETCHPOINTS); G = _Calque.AjouterGroupe("Contrainte axe"); _Select_Contraintes_ArreteCorps = G.AjouterSelectionBox("Arrete sur le corps"); _Select_Contraintes_ArreteCorps.SelectionMultipleMemeEntite = false; _Select_Contraintes_ArreteCorps.SelectionDansMultipleBox = false; _Select_Contraintes_ArreteCorps.UneSeuleEntite = true; _Select_Contraintes_ArreteCorps.FiltreSelection(swSelectType_e.swSelEDGES); _Select_Contraintes_AxeMarche = G.AjouterSelectionBox("Axe dans la marche"); _Select_Contraintes_AxeMarche.SelectionMultipleMemeEntite = false; _Select_Contraintes_AxeMarche.SelectionDansMultipleBox = false; _Select_Contraintes_AxeMarche.UneSeuleEntite = true; _Select_Contraintes_AxeMarche.FiltreSelection(swSelectType_e.swSelDATUMAXES); G = _Calque.AjouterGroupe("Contrainte plan"); _Select_Contraintes_PlanComp = G.AjouterSelectionBox("Plan dans le composant"); _Select_Contraintes_PlanComp.SelectionMultipleMemeEntite = false; _Select_Contraintes_PlanComp.SelectionDansMultipleBox = false; _Select_Contraintes_PlanComp.UneSeuleEntite = true; _Select_Contraintes_PlanComp.FiltreSelection(swSelectType_e.swSelDATUMPLANES); _Select_Contraintes_PlanMarche = G.AjouterSelectionBox("Plan dans la marche"); _Select_Contraintes_PlanMarche.SelectionMultipleMemeEntite = false; _Select_Contraintes_PlanMarche.SelectionDansMultipleBox = false; _Select_Contraintes_PlanMarche.UneSeuleEntite = true; _Select_Contraintes_PlanMarche.FiltreSelection(swSelectType_e.swSelDATUMPLANES); // OnCheck, on enregistre les parametres _CheckBox_EnregistrerSelection.OnCheck += _Select_Marche.ApplyOnSelection; _CheckBox_EnregistrerSelection.OnCheck += _Select_FonctionRepet.ApplyOnSelection; } catch (Exception e) { this.LogMethode(new Object[] { e }); } }
private void InitVariables() { NomFichier = _pFichierInfos.GetValeur <String>(); Iteration = 0; }
protected void Calque() { try { Groupe G; G = _Calque.AjouterGroupe("Appliquer"); _CheckBox_ToutesLesConfig = G.AjouterCheckBox(pToutesLesConfig); _CheckBox_EnregistrerSelection = G.AjouterCheckBox("Enregistrer les selections"); _Button_Preselection = G.AjouterBouton("Preselectionner"); _Button_Preselection.OnButtonPress += delegate(object sender) { PreSelection(); }; G = _Calque.AjouterGroupe("Face du dessus" + " ( " + pFaceDessus.GetValeur <String>() + "@" + pMarche.GetValeur <String>() + " )"); _Select_F_Dessus = G.AjouterSelectionBox("", "Selectionnez la face du dessus"); _Select_F_Dessus.SelectionMultipleMemeEntite = false; _Select_F_Dessus.SelectionDansMultipleBox = false; _Select_F_Dessus.UneSeuleEntite = true; _Select_F_Dessus.FiltreSelection(swSelectType_e.swSelFACES, swSelectType_e.swSelCOMPONENTS); _Select_F_Dessus.OnSubmitSelection += delegate(Object SelBox, Object selection, int selType, String itemText) { return(FiltreFace((CtrlSelectionBox)SelBox, selection, selType, pFaceDessus)); }; _Select_F_Dessus.OnApplyOnSelection += delegate(Object Box) { SvgNomComposant(Box, pMarche); }; G = _Calque.AjouterGroupe("Face de devant" + " ( " + pFaceDevant.GetValeur <String>() + "@" + pMarche.GetValeur <String>() + " )"); _Select_F_Devant = G.AjouterSelectionBox("", "Selectionnez la face de devant"); _Select_F_Devant.SelectionMultipleMemeEntite = false; _Select_F_Devant.SelectionDansMultipleBox = false; _Select_F_Devant.UneSeuleEntite = true; _Select_F_Devant.FiltreSelection(swSelectType_e.swSelFACES, swSelectType_e.swSelCOMPONENTS); _Select_F_Devant.OnSubmitSelection += delegate(Object SelBox, Object selection, int selType, String itemText) { return(FiltreFace((CtrlSelectionBox)SelBox, selection, selType, pFaceDevant)); }; _Select_F_Devant.OnApplyOnSelection += delegate(Object Box) { SvgNomComposant(Box, pMarche); }; _Select_F_Dessus.OnApplyOnSelection += _Select_F_Devant.GainedFocus; G = _Calque.AjouterGroupe("Platine gauche" + " ( " + pPlanContrainte.GetValeur <String>() + "@" + pPlatineG.GetValeur <String>() + " )"); _Select_PlatineG = G.AjouterSelectionBox("Plan à contraindre"); _Select_PlatineG.SelectionMultipleMemeEntite = false; _Select_PlatineG.SelectionDansMultipleBox = false; _Select_PlatineG.UneSeuleEntite = true; _Select_PlatineG.FiltreSelection(swSelectType_e.swSelDATUMPLANES, swSelectType_e.swSelCOMPONENTS, swSelectType_e.swSelFACES); _Select_PlatineG.OnSubmitSelection += delegate(Object SelBox, Object selection, int selType, String itemText) { return(FiltrePlan((CtrlSelectionBox)SelBox, selection, selType, pPlanContrainte)); }; // Svg des parametres _Select_PlatineG.OnApplyOnSelection += delegate(Object Box) { SvgNomComposant(Box, pPlatineG); }; _Select_PlatineG.OnApplyOnSelection += delegate(Object Box) { SvgNomFonction(Box, pPlanContrainte); }; _Select_F_Devant.OnApplyOnSelection += _Select_PlatineG.GainedFocus; G = _Calque.AjouterGroupe("Platine droite" + " ( " + pPlanContrainte.GetValeur <String>() + "@" + pPlatineD.GetValeur <String>() + " )"); _Select_PlatineD = G.AjouterSelectionBox("Plan à contraindre"); _Select_PlatineD.SelectionMultipleMemeEntite = false; _Select_PlatineD.SelectionDansMultipleBox = false; _Select_PlatineD.UneSeuleEntite = true; _Select_PlatineD.FiltreSelection(swSelectType_e.swSelDATUMPLANES, swSelectType_e.swSelCOMPONENTS, swSelectType_e.swSelFACES); _Select_PlatineD.OnSubmitSelection += delegate(Object SelBox, Object selection, int selType, String itemText) { return(FiltrePlan((CtrlSelectionBox)SelBox, selection, selType, pPlanContrainte)); }; // Svg des parametres _Select_PlatineD.OnApplyOnSelection += delegate(Object Box) { SvgNomComposant(Box, pPlatineD); }; _Select_PlatineD.OnApplyOnSelection += delegate(Object Box) { SvgNomFonction(Box, pPlanContrainte); }; _Select_PlatineG.OnApplyOnSelection += _Select_PlatineD.GainedFocus; // OnCheck, on enregistre les parametres _CheckBox_EnregistrerSelection.OnCheck += _Select_F_Dessus.ApplyOnSelection; _CheckBox_EnregistrerSelection.OnCheck += _Select_F_Devant.ApplyOnSelection; _CheckBox_EnregistrerSelection.OnCheck += _Select_PlatineG.ApplyOnSelection; _CheckBox_EnregistrerSelection.OnCheck += _Select_PlatineD.ApplyOnSelection; } catch (Exception e) { this.LogMethode(new Object[] { e }); } }
protected void PreSelection() { try { MdlBase.ClearSelection2(true); SelectionMgr SelMgr = MdlBase.SelectionManager; Component2 Piece = MdlBase.eRecChercherComposant(c => { return(Regex.IsMatch(c.Name2, _pPieceBase.GetValeur <String>()) && !c.IsSuppressed()); }); Component2 Percage = MdlBase.eRecChercherComposant(c => { return(Regex.IsMatch(c.Name2, _pPercage.GetValeur <String>()) && !c.IsSuppressed()); }); if (Piece.IsRef()) { MdlBase.eSelectMulti(Piece, _Select_Percage.Marque, false); } if (Percage.IsRef()) { MdlBase.eSelectMulti(Percage, _Select_Percage.Marque, false); } _Select_Base.Focus = true; } catch (Exception e) { this.LogMethode(new Object[] { e }); } }