Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations KootK on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hi ! Can someone tell me how to r

Status
Not open for further replies.

fcalin21

Mechanical
Dec 18, 2020
5
Hi !
Can someone tell me how to retreive the relation collection of an object ?
I have this code (only the relevant code posted) and the relation.count is 0 but in the image attached we can see 1 relation.

Set Relatii = oPiesa_De_Modificat.Part.Relations.SubList(oHole(i), True)

The relation does not show on the part collection relations either.

Set Relatii = oPiesa_De_Modificat.Part.Relations ' Relatii.count=0
I want to remove this relation without using selection method. How do i do this ?

Thanks.



 
 https://files.engineering.com/getfile.aspx?folder=b12248c2-03ce-4e8c-b25b-931886770bce&file=HOLE_RELATIONS.jpg
Replies continue below

Recommended for you

I guess you have to retrieve Parameters, not Relations and then reset specific parameter's Relation property.
 
Code:
Set formula1 = oHole.BottomLimit.Dimension.OptionalRelation
formula1.Parent.Remove (formula1.Name)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor