cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X

Referencial integrity error while deleteing CAD

Sandy7
10-Marble

Referencial integrity error while deleteing CAD

Hello,

I am facing Referencial integrity error while deleteing CAD "Referential integrity violations occurred for this operation:
Cannot delete wxxxxxxx.prt, because it is used by Assembly  - wxxxxxxx.asm, D.14
Cannot delete CAD Part  - wxxxxxxx.prt, because it is referenced by Assembly  - wxxxxxxxx.asm, D.17, Drawing  - wxxxxxxx.drw, D.12

 

please help.

 

Br,

Sandeep C.

1 ACCEPTED SOLUTION

Accepted Solutions
HelesicPetr
21-Topaz II
(To:Sandy7)

Hi @Sandy7 

Delete the assembly iteration where the part is used in. 

But it is not so easy if the assembly is used by other objects as a drawing or another assembly.

 

In some cases purge can help or delete previous iterations can help if it is available. But it can be really complex issue.

 

PetrH

 

View solution in original post

8 REPLIES 8
HelesicPetr
21-Topaz II
(To:Sandy7)

Hi @Sandy7 

First you need to delete the assembly where the part is used. Also the drawings.

 wxxxxxxx.asm, D.14

 

If there is reference you can not delete it without deleting the usage.

simple explanation you can not remove walls if there is a roof on it

 

PetrH

How to break the reference link? any chance?

 

Br,

Sandeep C.

Fadel
22-Sapphire I
(To:Sandy7)

you have to delete the referencing objects first , or cut links using SQL (Not recommended ) .

generally we run the attached SQL script with the object ida2a2 (OR) and its ida3masterreference (UsageLinks...) to see where it is referenced  :

 

 

 

Fede
HelesicPetr
21-Topaz II
(To:Fadel)

@Fadel 

From the user perspective the sql deletion is not possible to do so. 

And yes it is nor recommended because it can case data integrity issue and upgrade issues. 

PetrH

Fadel
22-Sapphire I
(To:HelesicPetr)

Hello @HelesicPetr  I know it is not supported , but the scripts helps to identify where the references are held.

on the other hand when the data is corrupt (some scenarios with errors "the object with the following key was deleted or inaccessible"  ), the SQL remain the only possibility to fix ,however healing scripts require R&D blessing if issue is on Prod, on sandbox systems we backup tables and cross fingers .  

Fede
HelesicPetr
21-Topaz II
(To:Fadel)

Yes @Fadel 

cross fingers 😄

PetrH

HelesicPetr
21-Topaz II
(To:Sandy7)

Hi @Sandy7 

Delete the assembly iteration where the part is used in. 

But it is not so easy if the assembly is used by other objects as a drawing or another assembly.

 

In some cases purge can help or delete previous iterations can help if it is available. But it can be really complex issue.

 

PetrH

 

@Fadel , @HelesicPetr  thankyou for the suggetions guys. probably rolling back seems only the option as user point of view.

 

Br,

Sandeep C. 

Top Tags