rename constrains -- Patrick

rename constrains -- Patrick

Anonymous
Not applicable
301 Views
1 Reply
Message 1 of 2

rename constrains -- Patrick

Anonymous
Not applicable

How do you run this Patrick routine.

Ole

 

Public Sub RenameConstrByParts()

    Dim oAsmCompDef As
AssemblyComponentDefinition
    Set oAsmCompDef =
ThisApplication.ActiveDocument.ComponentDefinition
    Dim
oConstraint As AssemblyConstraint
    For Each oConstraint In
oAsmCompDef.Constraints
       
oConstraint.Name = oConstraint.OccurrenceOne.Name & " - " &
oConstraint.OccurrenceTwo.Name
    Next

End Sub

0 Likes
302 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable
Ole

Should just show up in the Macro list as RenameConstrByParts.

--
Kent Keller
http://kwik-mcad.scriptmania.com/

"Ole Germer" wrote in message
news:E56DAB1E02851129D1E6D996D05CC19C@in.WebX.maYIadrTaRb...
> How do you run this Patrick routine.
>
> Ole
>
>
>
> Public Sub RenameConstrByParts()
>
> Dim oAsmCompDef As AssemblyComponentDefinition
> Set oAsmCompDef = ThisApplication.ActiveDocument.ComponentDefinition
> Dim oConstraint As AssemblyConstraint
> For Each oConstraint In oAsmCompDef.Constraints
> oConstraint.Name = oConstraint.OccurrenceOne.Name & " - " &
oConstraint.OccurrenceTwo.Name
> Next
>
> End Sub
>
>
0 Likes