ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/REPOS_ERICCA/magicsld/Debug_form.vb
(Generate patch)

Comparing magicsld/Debug_form.vb (file contents):
Revision 40 by bournival, Mon Aug 20 21:30:28 2007 UTC vs.
Revision 130 by bournival, Wed Jul 30 21:26:03 2008 UTC

# Line 1 | Line 1
1 + Imports SolidWorks.Interop
2 + Imports SolidWorks.Interop.swconst
3 + Imports SolidWorks.Interop.swpublished
4 +
5   Public Class Debug_form
6      Inherits System.Windows.Forms.Form
7  
# Line 29 | Line 33 | Public Class Debug_form
33      'REMARQUE : la procédure suivante est requise par le Concepteur Windows Form
34      'Elle peut être modifiée en utilisant le Concepteur Windows Form.  
35      'Ne la modifiez pas en utilisant l'éditeur de code.
32    Friend WithEvents Label1 As System.Windows.Forms.Label
33    Friend WithEvents ListBox1 As System.Windows.Forms.ListBox
36      Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox
37      Friend WithEvents Label2 As System.Windows.Forms.Label
38      Friend WithEvents Label3 As System.Windows.Forms.Label
# Line 61 | Line 63 | Public Class Debug_form
63      Friend WithEvents Label27 As System.Windows.Forms.Label
64      Friend WithEvents ListBox2 As System.Windows.Forms.ListBox
65      <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
64        Me.Label1 = New System.Windows.Forms.Label
65        Me.ListBox1 = New System.Windows.Forms.ListBox
66          Me.GroupBox1 = New System.Windows.Forms.GroupBox
67          Me.Label23 = New System.Windows.Forms.Label
68          Me.Label22 = New System.Windows.Forms.Label
# Line 96 | Line 96 | Public Class Debug_form
96          Me.GroupBox2.SuspendLayout()
97          Me.SuspendLayout()
98          '
99        'Label1
100        '
101        Me.Label1.Location = New System.Drawing.Point(8, 8)
102        Me.Label1.Name = "Label1"
103        Me.Label1.Size = New System.Drawing.Size(184, 16)
104        Me.Label1.TabIndex = 0
105        Me.Label1.Text = "Poutres et coques sélectionnées:"
106        '
107        'ListBox1
108        '
109        Me.ListBox1.Items.AddRange(New Object() {"gfdgd"})
110        Me.ListBox1.Location = New System.Drawing.Point(8, 24)
111        Me.ListBox1.Name = "ListBox1"
112        Me.ListBox1.Size = New System.Drawing.Size(200, 290)
113        Me.ListBox1.TabIndex = 1
114        '
99          'GroupBox1
100          '
101          Me.GroupBox1.Controls.Add(Me.Label23)
102          Me.GroupBox1.Controls.Add(Me.Label22)
103 +        Me.GroupBox1.Controls.Add(Me.GroupBox2)
104          Me.GroupBox1.Controls.Add(Me.Label21)
105          Me.GroupBox1.Controls.Add(Me.Label20)
106          Me.GroupBox1.Controls.Add(Me.Label19)
# Line 136 | Line 121 | Public Class Debug_form
121          Me.GroupBox1.Controls.Add(Me.Label4)
122          Me.GroupBox1.Controls.Add(Me.Label3)
123          Me.GroupBox1.Controls.Add(Me.Label2)
124 <        Me.GroupBox1.Location = New System.Drawing.Point(216, 8)
124 >        Me.GroupBox1.Location = New System.Drawing.Point(12, 12)
125          Me.GroupBox1.Name = "GroupBox1"
126          Me.GroupBox1.Size = New System.Drawing.Size(336, 312)
127          Me.GroupBox1.TabIndex = 2
# Line 336 | Line 321 | Public Class Debug_form
321          Me.GroupBox2.Controls.Add(Me.Label26)
322          Me.GroupBox2.Controls.Add(Me.Label25)
323          Me.GroupBox2.Controls.Add(Me.Label24)
324 <        Me.GroupBox2.Location = New System.Drawing.Point(216, 8)
324 >        Me.GroupBox2.Location = New System.Drawing.Point(0, 0)
325          Me.GroupBox2.Name = "GroupBox2"
326          Me.GroupBox2.Size = New System.Drawing.Size(272, 312)
327          Me.GroupBox2.TabIndex = 3
# Line 380 | Line 365 | Public Class Debug_form
365          '
366          'ListBox2
367          '
368 <        Me.ListBox2.Location = New System.Drawing.Point(558, 16)
368 >        Me.ListBox2.Location = New System.Drawing.Point(363, 12)
369          Me.ListBox2.Name = "ListBox2"
370          Me.ListBox2.Size = New System.Drawing.Size(402, 446)
371          Me.ListBox2.TabIndex = 4
# Line 390 | Line 375 | Public Class Debug_form
375          Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
376          Me.ClientSize = New System.Drawing.Size(968, 486)
377          Me.Controls.Add(Me.ListBox2)
393        Me.Controls.Add(Me.ListBox1)
394        Me.Controls.Add(Me.Label1)
378          Me.Controls.Add(Me.GroupBox1)
396        Me.Controls.Add(Me.GroupBox2)
379          Me.Name = "Debug_form"
380          Me.Text = "Debug_form"
381          Me.GroupBox1.ResumeLayout(False)
# Line 421 | Line 403 | Public Class Debug_form
403          Dim x3 As Double
404          Dim y3 As Double
405          Dim z3 As Double
406 <        Dim swent As SldWorks.Entity
406 >        Dim swent As sldworks.Entity
407      End Structure
408  
409      Private detail() As info
410  
411  
412      Private Sub Debug_form_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
413 <        Dim selmgr As SldWorks.SelectionMgr
413 >        Dim selmgr As sldworks.SelectionMgr
414          Dim i As Integer
415 <        Dim swEnt As SldWorks.Entity
416 <        Dim swFeat As SldWorks.Feature
417 <        Dim liste() As String
418 <        Dim attr As SldWorks.Attribute
419 <        ReDim liste(0)
420 <        ReDim detail(0)
415 >        Dim swEnt As sldworks.Entity
416 >        Dim swFeat As sldworks.Feature
417 >        Dim attr As sldworks.Attribute
418 >
419 >        Try
420 >            Intersections.RegisterAttribut()
421 >
422 >            ' si on a sélectionné qqchose qui n'est pas une entité (sketch)
423 >
424 >            selmgr = swModel.SelectionManager
425 >            If selmgr.GetSelectedObjectCount = 0 Then Exit Sub
426 >
427 >            For i = 1 To selmgr.GetSelectedObjectCount
428 >
429 >                swEnt = selmgr.GetSelectedObject5(i)
430 >
431 >                Select Case swEnt.GetType
432 >
433 >
434 >                    Case swconst.swSelectType_e.swSelATTRIBUTES ' un attribut sélectionné dans le featuremanager
435 >                        Try
436 >
437 >                            swFeat = swEnt
438 >                            attr = swFeat.GetSpecificFeature2()
439 >                            ecrire(attr)
440 >
441 >                        Catch
442 >                        End Try
443 >
444 >                    Case swconst.swSelectType_e.swSelEDGES
445 >                        Try
446 >                            ' on essai pour la condition aux limites
447 >                            ListBox2.Items.Add("------------------------------")
448 >                            ListBox2.Items.Add("---------ARETE------------")
449 >                            Dim arr As sldworks.Edge = swEnt
450 >                            Dim e3 As New SuperArete(arr, True)
451 >                            ListBox2.Items.Add("Nom   = " & e3.nom)
452 >                            ListBox2.Items.Add("Long. = " & e3.Longueur)
453 >                            ecrire(swEnt)
454 >                        Catch
455 >                        End Try
456 >
457 >
458 >
459 >                    Case swconst.swSelectType_e.swSelFACES
460 >                        ' on essai pour la condition aux limites
461 >                        ListBox2.Items.Add("------------------------------")
462 >                        ListBox2.Items.Add("---------FACE-------------")
463 >                        Dim swFace As sldworks.Face2 = swEnt
464 >                        Dim face As New SuperFace(swFace, True)
465 >                        ListBox2.Items.Add("Nom   = " & face.nom)
466 >                        ListBox2.Items.Add("Aire: =" & face.Aire)
467 >                        ecrire(swEnt)
468 >
469 >                    Case swconst.swSelectType_e.swSelVERTICES
470 >                        ListBox2.Items.Add("------------------------------")
471 >                        ListBox2.Items.Add("---------Sommet-------------")
472 >                        Dim swSommet As sldworks.Vertex = swEnt
473 >                        Dim Ssommet As New SuperSommet(swSommet)
474 >                        ListBox2.Items.Add("Nom   = " & Ssommet.nom)
475 >                        ListBox2.Items.Add("x:= " & Ssommet.GetX)
476 >                        ListBox2.Items.Add("y:= " & Ssommet.GetY)
477 >                        ListBox2.Items.Add("z:= " & Ssommet.GetZ)
478 >                        ecrire(swEnt)
479 >
480 >
481 >
482 >                End Select
483 >            Next
484 >
485 >        Catch
486 >        End Try
487 >
488 >    End Sub
489 >
490 >
491 >    Private Sub ecrire(ByRef swent As sldworks.Entity, Optional ByRef attr As sldworks.Attribute = Nothing)
492 >        ' faut trouver quel est l'attribut (s'il y en a un)
493 >        Dim trouvé As Boolean = False
494 >        Dim p As sldworks.Parameter
495          Intersections.RegisterAttribut()
496 <        'swModel.EditRebuild3()
497 <        ' si on a sélectionné qqchose qui n'est pas une entité (sketch)
498 <        liste(0) = " "
499 <        selmgr = swModel.SelectionManager
500 <
501 <        For i = 1 To selmgr.GetSelectedObjectCount
502 <
503 <            swEnt = selmgr.GetSelectedObject5(i)
504 <
505 <
506 <            'If MsgBox("Register?", MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then RealConstant.RCCode.RegisterAttribut()
507 <
508 <
509 <            Select Case swEnt.GetType
510 <                Case SwConst.swSelectType_e.swSelATTRIBUTES
511 <                    swFeat = swEnt
512 <                    attr = swFeat.GetSpecificFeature2()
513 <                    If Not attr Is Nothing Then
514 <                        populer(attr, swEnt)
515 <                        ReDim Preserve liste(UBound(liste) + 1)
516 <                        liste(UBound(liste)) = attr.GetName()
517 <                        'MsgBox("Ambigu = " & attr.GetEntityState(SwConst.swAssociatedEntityStates_e.swIsEntityAmbiguous) & "  Deleted = " & attr.GetEntityState(SwConst.swAssociatedEntityStates_e.swIsEntityDeleted) & "  Invalid = " & attr.GetEntityState(SwConst.swAssociatedEntityStates_e.swIsEntityInvalid) & "  Suppressed = " & attr.GetEntityState(SwConst.swAssociatedEntityStates_e.swIsEntitySuppressed))
518 <                    End If
519 <
520 <
521 <                Case SwConst.swSelectType_e.swSelEDGES
522 <                    ' on essai pour la condition aux limites
523 <                    attr = swEnt.FindAttribute(Intersections.DefAttrConditionLimite, 0)
524 <                    If Not attr Is Nothing Then
525 <                        populer(attr, swEnt)
526 <                        ReDim Preserve liste(UBound(liste) + 1)
527 <                        liste(UBound(liste)) = attr.GetName()
528 <                    End If
529 <
530 <                    ' puis on essai pour les realConstant
531 <                    attr = swEnt.FindAttribute(Intersections.DefAttrRCP1, 0)
532 <                    If Not attr Is Nothing Then
533 <                        populer(attr, swEnt)
534 <                        ReDim Preserve liste(UBound(liste) + 1)
535 <                        liste(UBound(liste)) = attr.GetName()
536 <                    End If
537 <
482 <                    ' puis on essai pour les Ignorer
483 <                    attr = swEnt.FindAttribute(Intersections.DefAttrIgnorer, 0)
484 <                    If Not attr Is Nothing Then
485 <                        populer(attr, swEnt)
486 <                        ReDim Preserve liste(UBound(liste) + 1)
487 <                        liste(UBound(liste)) = attr.GetName()
488 <                    End If
489 <
490 <
491 <                Case SwConst.swSelectType_e.swSelFACES
492 <                    ' on essai pour la condition aux limites
493 <                    attr = swEnt.FindAttribute(Intersections.DefAttrConditionLimite, 0)
494 <                    If Not attr Is Nothing Then
495 <                        populer(attr, swEnt)
496 <                        ReDim Preserve liste(UBound(liste) + 1)
497 <                        liste(UBound(liste)) = attr.GetName()
498 <                    End If
499 <
500 <                    Dim swface As SldWorks.Face2
501 <                    swface = swEnt
502 <
503 <                    attr = swEnt.FindAttribute(Intersections.DefAttrRCCoque, 0)
504 <                    If Not attr Is Nothing Then
505 <                        populer(attr, swEnt)
506 <                        ReDim Preserve liste(UBound(liste) + 1)
507 <                        liste(UBound(liste)) = attr.GetName()
508 <                    End If
509 <
510 <
511 <                    attr = swEnt.FindAttribute(Intersections.DefAttrFaceInterne, 0)
512 <                    If Not attr Is Nothing Then
513 <                        populer(attr, swEnt)
514 <                        ReDim Preserve liste(UBound(liste) + 1)
515 <                        liste(UBound(liste)) = attr.GetName()
516 <                    End If
496 >        Commun.ColorerAretes()
497 >        Try
498 >            If attr Is Nothing Then attr = swent.FindAttribute(Intersections.DefAttrConditionLimite, 0)
499 >            If attr IsNot Nothing Then
500 >                trouvé = True
501 >                ListBox2.Items.Add(" ** Condition limite ** ")
502 >                ListBox2.Items.Add(" Nom att. = " & attr.GetName)
503 >                p = attr.GetParameter("CL")
504 >                ListBox2.Items.Add("  CL = " & p.GetStringValue)
505 >
506 >                attr = Nothing
507 >            End If
508 >        Catch
509 >        End Try
510 >
511 >        Try
512 >            If attr Is Nothing Then attr = swent.FindAttribute(Intersections.DefAttrDoublon, 0)
513 >            If attr IsNot Nothing Then
514 >                trouvé = True
515 >                ListBox2.Items.Add(" ** Doublon ** ")
516 >                ListBox2.Items.Add(" Nom att. = " & attr.GetName)
517 >                p = attr.GetParameter("Maitre")
518 >                ListBox2.Items.Add(p.GetStringValue)
519 >                p = attr.GetParameter("Sens")
520 >                ListBox2.Items.Add(p.GetDoubleValue)
521 >                attr = Nothing
522 >            End If
523 >        Catch
524 >        End Try
525 >
526 >        Try
527 >            If attr Is Nothing Then attr = swent.FindAttribute(Intersections.DefAttrFaceInterne, 0)
528 >            If attr IsNot Nothing Then
529 >                trouvé = True
530 >                ListBox2.Items.Add(" ** Face Interne ** ")
531 >                ListBox2.Items.Add(" Nom att. = " & attr.GetName)
532 >                p = attr.GetParameter("FI")
533 >                ListBox2.Items.Add("  Taille élems = " & p.GetDoubleValue)
534 >                p = attr.GetParameter("Po")
535 >                If p.GetDoubleValue = 0 Then ListBox2.Items.Add("  Poutre ") Else ListBox2.Items.Add("  Coque ")
536 >                attr = Nothing
537 >            End If
538  
539 +        Catch
540 +        End Try
541  
542 +        Try
543 +            If attr Is Nothing Then attr = swent.FindAttribute(Intersections.DefAttrIgnorer, 0)
544 +            If attr IsNot Nothing Then
545 +                trouvé = True
546 +                ListBox2.Items.Add(" ** Ignorer ** ")
547 +                ListBox2.Items.Add(" Nom att. = " & attr.GetName)
548 +
549 +                attr = Nothing
550 +            End If
551 +        Catch
552 +
553 +        End Try
554 +
555 +        Try
556 +            If attr Is Nothing Then attr = swent.FindAttribute(Intersections.DefAttrInterALAL, 0)
557 +            If attr IsNot Nothing Then
558 +                trouvé = True
559 +                ListBox2.Items.Add(" ** Inter AL AL ** ")
560 +                ListBox2.Items.Add(" Nom att. = " & attr.GetName)
561 +                p = attr.GetParameter("X")
562 +                ListBox2.Items.Add("  X" & p.GetDoubleValue)
563 +                p = attr.GetParameter("Y")
564 +                ListBox2.Items.Add("  Y" & p.GetDoubleValue)
565 +                p = attr.GetParameter("Z")
566 +                ListBox2.Items.Add("  Z" & p.GetDoubleValue)
567 +                p = attr.GetParameter("T")
568 +                ListBox2.Items.Add("  T" & p.GetDoubleValue)
569 +
570 +                attr = Nothing
571 +            End If
572 +        Catch
573 +        End Try
574 +
575 +        Try
576 +            If attr Is Nothing Then attr = swent.FindAttribute(Intersections.DefAttrRCCoque, 0)
577 +            If attr IsNot Nothing Then
578 +                trouvé = True
579 +                ListBox2.Items.Add(" ** RC Coque ** ")
580 +                ListBox2.Items.Add(" Nom att. = " & attr.GetName)
581 +                p = attr.GetParameter("Ep")
582 +                ListBox2.Items.Add("  Épaiss." & p.GetDoubleValue)
583 +                p = attr.GetParameter("Flag")
584 +                ListBox2.Items.Add("  Flag." & p.GetDoubleValue)
585 +                attr = Nothing
586 +            End If
587 +        Catch
588 +        End Try
589 +
590 +        Try
591 +            If attr Is Nothing Then attr = swent.FindAttribute(Intersections.DefAttrRCP1, 0)
592 +            If attr IsNot Nothing Then
593 +                trouvé = True
594 +                ListBox2.Items.Add(" ** RC Poutre ** ")
595 +                ListBox2.Items.Add(" Nom att. = " & attr.GetName)
596 +                p = attr.GetParameter("S")
597 +                ListBox2.Items.Add("  Section" & p.GetStringValue)
598 +                p = attr.GetParameter("As")
599 +                ListBox2.Items.Add("  Aire sect." & p.GetDoubleValue)
600 +                p = attr.GetParameter("I1")
601 +                ListBox2.Items.Add("  Iner 1" & p.GetDoubleValue)
602 +                p = attr.GetParameter("I2")
603 +                ListBox2.Items.Add("  Iner 2" & p.GetDoubleValue)
604 +                p = attr.GetParameter("N3")
605 +                ListBox2.Items.Add("  N3" & p.GetStringValue)
606 +                p = attr.GetParameter("D1")
607 +                ListBox2.Items.Add("  D1" & p.GetDoubleValue)
608 +                p = attr.GetParameter("D2")
609 +                ListBox2.Items.Add("  D2" & p.GetDoubleValue)
610 +                p = attr.GetParameter("D3")
611 +                ListBox2.Items.Add("  D3" & p.GetDoubleValue)
612 +                p = attr.GetParameter("D4")
613 +                ListBox2.Items.Add("  D4" & p.GetDoubleValue)
614 +                p = attr.GetParameter("D5")
615 +                ListBox2.Items.Add("  D5" & p.GetDoubleValue)
616 +                p = attr.GetParameter("D6")
617 +                ListBox2.Items.Add("  D6" & p.GetDoubleValue)
618 +                p = attr.GetParameter("Flag")
619 +                ListBox2.Items.Add("  Flag" & p.GetDoubleValue)
620 +                attr = Nothing
621 +            End If
622 +
623 +
624 +            If Not trouvé Then
625 +                ListBox2.Items.Add("  --Pas d'attributs trouvés--")
626 +            End If
627 +
628 +
629 +        Catch
630 +            'MsgBox("Bug dans écrire de la débug_form")
631 +        End Try
632  
520            End Select
521        Next
633  
523        ListBox1.DataSource = liste
634  
635      End Sub
636  
637 <    Private Sub populer(ByRef attr As SldWorks.Attribute, ByRef swent As SldWorks.Entity)
637 >
638 >
639 >
640 >
641 >
642 >    Private Sub populer(ByRef attr As sldworks.Attribute, ByRef swent As sldworks.Entity)
643  
644          Dim i As Integer
645 <        Dim p As SldWorks.Parameter
645 >        Dim p As sldworks.Parameter
646          i = UBound(detail) + 1
647  
648          ReDim Preserve detail(i)
# Line 649 | Line 764 | Public Class Debug_form
764   fin:
765      End Sub
766  
767 <    Private Sub Label1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label1.Click
767 >    Private Sub Label1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
768  
769      End Sub
770  
771 <    Private Sub ListBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListBox1.SelectedIndexChanged
772 <        Dim i As Integer
773 <        i = ListBox1.SelectedIndex()
774 <        If i = 0 Then Exit Sub
775 <
776 <        If detail(i).tipe = 1 Then
777 <            ' on vient de sélectionner une poutre
778 <            GroupBox2.Visible = False
779 <            GroupBox1.Visible = True
780 <
781 <            Label13.Text = detail(i).M
782 <            Label14.Text = detail(i).S
783 <            Label15.Text = detail(i).I1
784 <            Label16.Text = detail(i).I2
785 <            Label17.Text = detail(i).D1
786 <            Label18.Text = detail(i).D2
787 <            Label19.Text = detail(i).A
788 <            Label20.Text = detail(i).N3
789 <            Label21.Text = detail(i).x3
790 <            Label22.Text = detail(i).y3
791 <            Label23.Text = detail(i).z3
792 <
793 <        ElseIf detail(i).tipe = 2 Then
794 <            ' on a sélectionné une coque
795 <            GroupBox1.Visible = False
796 <            GroupBox2.Visible = True
797 <
798 <            Label26.Text = detail(i).M
799 <            Label27.Text = detail(i).Ep
800 <        End If
801 <
802 <        On Error Resume Next
803 <        ' on peut sélectionner aussi les entités:
804 <        detail(i).swent.Select(False)
805 <        'swModel.SelectedFeatureProperties(255, 0.8, 0.5, 0.5, 1, 0, 1, False, False, 0)
806 <        ' si le entity est un
807 <        If detail(i).swent.GetType = SwConst.swSelectType_e.swSelATTRIBUTES Then
808 <            Dim swfeat As SldWorks.Feature
809 <            Dim attr As SldWorks.Attribute
810 <            Dim ent As SldWorks.Entity
811 <            swfeat = detail(i).swent
812 <            attr = swfeat.GetSpecificFeature2()
813 <            ent = attr.GetEntity
814 <            ent.Select(True)
815 <            'swModel.SelectedFeatureProperties(255, 0.8, 0.5, 0.5, 1, 0, 1, False, False, 0)
816 <        End If
771 >    Private Sub ListBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs)
772 >        'Dim i As Integer
773 >        'i = ListBox1.SelectedIndex()
774 >        'If i = 0 Then Exit Sub
775 >
776 >        'If detail(i).tipe = 1 Then
777 >        '    ' on vient de sélectionner une poutre
778 >        '    GroupBox2.Visible = False
779 >        '    GroupBox1.Visible = True
780 >
781 >        '    Label13.Text = detail(i).M
782 >        '    Label14.Text = detail(i).S
783 >        '    Label15.Text = detail(i).I1
784 >        '    Label16.Text = detail(i).I2
785 >        '    Label17.Text = detail(i).D1
786 >        '    Label18.Text = detail(i).D2
787 >        '    Label19.Text = detail(i).A
788 >        '    Label20.Text = detail(i).N3
789 >        '    Label21.Text = detail(i).x3
790 >        '    Label22.Text = detail(i).y3
791 >        '    Label23.Text = detail(i).z3
792 >
793 >        'ElseIf detail(i).tipe = 2 Then
794 >        '    ' on a sélectionné une coque
795 >        '    GroupBox1.Visible = False
796 >        '    GroupBox2.Visible = True
797 >
798 >        '    Label26.Text = detail(i).M
799 >        '    Label27.Text = detail(i).Ep
800 >        'End If
801 >
802 >        'On Error Resume Next
803 >        '' on peut sélectionner aussi les entités:
804 >        'detail(i).swent.Select(False)
805 >        ''swModel.SelectedFeatureProperties(255, 0.8, 0.5, 0.5, 1, 0, 1, False, False, 0)
806 >        '' si le entity est un
807 >        'If detail(i).swent.GetType = swconst.swSelectType_e.swSelATTRIBUTES Then
808 >        '    Dim swfeat As sldworks.Feature
809 >        '    Dim attr As sldworks.Attribute
810 >        '    Dim ent As sldworks.Entity
811 >        '    swfeat = detail(i).swent
812 >        '    attr = swfeat.GetSpecificFeature2()
813 >        '    ent = attr.GetEntity
814 >        '    ent.Select(True)
815 >        '    'swModel.SelectedFeatureProperties(255, 0.8, 0.5, 0.5, 1, 0, 1, False, False, 0)
816 >        'End If
817  
818      End Sub
819  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines