Hello All,
I am trying to use the method of "AddBiEltCst" to constrain a point in one part to a point in another part in same assembly.
Please see the attached pic as to what my requirement is and what the error i am facing.
I have tried the following to correct the error
1. Early binding objects
2. Late binding objects
3. Tried all the four CreateReferenceFromGeometry, CreateReferenceFromBrepNames, CreateReferenceFromObject, CreateReferenceFromName to create references.
Please see the snippet and suggest me a solution
''''''''''''''''' *Code Snippet Starts*'''''''''''''''''''''''''
'
'
' Rest of the Codes Here (If needed please ask)
'
'
Dim PointRefOnPart As Reference
Set PointRefOnPart = CorrespondingPart.CreateReferenceFromObject(pointhybshape)
Dim PointRefOnPanel As Reference
Set PointRefOnPanel = CorrespondingPanelPart.CreateReferenceFromObject(ArrayToHoldLinesPoints(j - 1, 0))'''''' This is inside a for loop hence the index j
Dim FirstConstraint As Constraint
Set FirstConstraint = oConstraints.AddBiEltCst (catCstTypeOn, PointRefOnPart, PointRefOnPanel)'''''Fails at this line.Error message reads The method AddBiEltCst of object constraints failed
RootProduct.Update'
'
'
''''''''''''''''' *Code Snippet Ends*'''''''''''''''''''''''''
' other relevant info
Dim pointhybshape
Set pointhybshape = bhybridShapes.Item("SnapPoint")'''''''''''''''''''(pointhybshape is the hybridpoint)
Set ArrayToHoldLinesPoints(i - 1, 0) = ohybridShapes.Item(i)''''''''''(This Array holds hybridpoints from geosets)
I am trying to use the method of "AddBiEltCst" to constrain a point in one part to a point in another part in same assembly.
Please see the attached pic as to what my requirement is and what the error i am facing.
I have tried the following to correct the error
1. Early binding objects
2. Late binding objects
3. Tried all the four CreateReferenceFromGeometry, CreateReferenceFromBrepNames, CreateReferenceFromObject, CreateReferenceFromName to create references.
Please see the snippet and suggest me a solution
''''''''''''''''' *Code Snippet Starts*'''''''''''''''''''''''''
'
'
' Rest of the Codes Here (If needed please ask)
'
'
Dim PointRefOnPart As Reference
Set PointRefOnPart = CorrespondingPart.CreateReferenceFromObject(pointhybshape)
Dim PointRefOnPanel As Reference
Set PointRefOnPanel = CorrespondingPanelPart.CreateReferenceFromObject(ArrayToHoldLinesPoints(j - 1, 0))'''''' This is inside a for loop hence the index j
Dim FirstConstraint As Constraint
Set FirstConstraint = oConstraints.AddBiEltCst (catCstTypeOn, PointRefOnPart, PointRefOnPanel)'''''Fails at this line.Error message reads The method AddBiEltCst of object constraints failed
RootProduct.Update'
'
'
''''''''''''''''' *Code Snippet Ends*'''''''''''''''''''''''''
' other relevant info
Dim pointhybshape
Set pointhybshape = bhybridShapes.Item("SnapPoint")'''''''''''''''''''(pointhybshape is the hybridpoint)
Set ArrayToHoldLinesPoints(i - 1, 0) = ohybridShapes.Item(i)''''''''''(This Array holds hybridpoints from geosets)