How do I get the overridden value from a positional representation??

How do I get the overridden value from a positional representation??

HermJan.Otterman
Advisor Advisor
444 Views
2 Replies
Message 1 of 3

How do I get the overridden value from a positional representation??

HermJan.Otterman
Advisor
Advisor

you can override the "relationship-value" with:

 

oPosrep.SetRelationshipSuppressionOverride(oRelationShip, False)

oPosrep.SetRelationshipValueOverride(oRelationShip, RelationshipValueTypeEnum.kRelationshipOffsetValue, Value)

 

but is there a way to get this overridden VALUE, once it is overridden?

 

 

does it have something to do with the:

RepManager.PositionalRepresentations.ExcelWorkSheet .....??

I can't get anything from this worksheet...

 

thanks

 

 

If this answers your question then please select "Accept as Solution"
Kudo's are also appreciated Smiley Wink

Succes on your project, and have a nice day

Herm Jan


0 Likes
Accepted solutions (1)
445 Views
2 Replies
Replies (2)
Message 2 of 3

adam.nagy
Autodesk Support
Autodesk Support
Accepted solution

Hi,

 

You can get it from the relationship object, e.g. the MateConstraint:

Sub PosReps()
  ' The positional representation and the mate constraint need
  ' to be selected in the UI before running this
  Dim oPosRep As PositionalRepresentation
  Set oPosRep = ThisApplication.ActiveDocument.SelectSet(1)
  Dim oMate As MateConstraint
  Set oMate = ThisApplication.ActiveDocument.SelectSet(2)
  posrep.SetRelationshipSuppressionOverride rs, False
  posrep.SetRelationshipValueOverride rs, RelationshipValueTypeEnum.kRelationshipOffsetValue, "12"
  
  Dim strVal As String
  Dim isOverridden As Boolean
  isOverridden = posrep.IsRelationshipValueOverridden(oMate, RelationshipValueTypeEnum.kRelationshipOffsetValue, strVal)
  Debug.Print "Overridden offset = " + strVal
  Debug.Print "Original offset = " + Str(oMate.Offset.value)
End Sub

Cheers,



Adam Nagy
Autodesk Platform Services
0 Likes
Message 3 of 3

HermJan.Otterman
Advisor
Advisor

Thanks Adam,

 

it worked

I did't know that you cloud get a value this way.

 

thanks

If this answers your question then please select "Accept as Solution"
Kudo's are also appreciated Smiley Wink

Succes on your project, and have a nice day

Herm Jan


0 Likes