Message 1 of 4
PositionalRepresentation.SetConstraintValueOverride ==> use of parameter
Not applicable
05-13-2014
12:39 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi there,
I have an assembly with two parts connected with a mate constraint. In the assembly there is a parameter 'Offset' present but somehow the below code fails on the line 'Call oPosRep.SetConstraintValueOverride(oConstraint, "Offset")'.
When I manually create a PosRep with an override on the mate constraint I am allowed to use the 'Offset' parameter. So why doesn't this work from VBA?
Note that the below code does work if I replace 'Offset' with a numeric value.
Sub CreatePosRep()
Dim oAssCompDef As AssemblyComponentDefinition
Set oAssCompDef = ThisApplication.ActiveDocument.ComponentDefinition
Dim oPosRep As PositionalRepresentation
Set oPosRep = oAssCompDef.RepresentationsManager.PositionalRepresentations.Add("PosRep1")
Dim oConstraint As AssemblyConstraint
Set oConstraint = oAssCompDef.Constraints(1)
Call oPosRep.SetConstraintValueOverride(oConstraint, "Offset")
End Sub
Hopefully someone can shed some light on this case.
Best regards, Daniël
IV2013 Professional SP2 Update 5
