Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

CATIA V5 - Force loading models of diffirent properties.

Status
Not open for further replies.

gcpdesign

Automotive
Feb 2, 2005
64
0
0
ZA
Hi All,
Situation:
I have updated some of my library items. Many of these have been used in designs. I have kept the names the same and thier origins the same. All I need is to open my assemblies and have catia load the new updated standards.

Problem:
Catia recocnizes that the file is new and won't load it. It loads it in "Desk", but it won't load it in the Cad world. I also can not sit and replace these parts one by one as there are to many to update.

Question:
Can i force-load these parts some how?

Thanx in advance,
Gary.
 
Replies continue below

Recommended for you

here is the problem, your files look like have new UUIDs.
You might need to update your library again but using save as method or save method, if you want to keep your orginal files than copy them somewhere then make your modifications. The advantage of using save as operation is that, this will ensure your updated files has the same uuid.

I hope this help
 
Hi,

The problem with UUID is correct (see also FAQ). I don't know if you like to update again the library...in any case you need to do additional work...

Another solution is to create a macro to replace the old components with the news one by macro.

A snippet is here:

Language="VBSCRIPT"

Sub CATMain()

' Set the CATIA popup file alerts to False
' It prevents to stop the macro at each alert during its execution
CATIA.DisplayFileAlerts = False

' Optional: allows to find the sample wherever it's installed
dim sDocPath As String
sDocPath=CATIA.SystemService.Environ("CATDocView")
If (Not CATIA.FileSystem.FolderExists(sDocPath)) Then

Dim productDocument1 As Document
Set productDocument1 = CATIA.ActiveDocument

Dim product1 As Product
Set product1 = productDocument1.Product

Dim products1 As Products
Set products1 = product1.Products

Dim product2 As Product
Set product2 = products1.Item("CATPart_1.1") ' Write the instance name of what you want to replace

Set Nothing1 = products1.ReplaceComponent(product2, "/folder1/subfolder/CATPart_1_new.CATPart", True) 'Write the path and the name of the CATPart

Dim constraints1 As Collection 'if you need constraints...
Set constraints1 = product1.Connections("CATIAConstraints")

Dim reference1 As Reference
Set reference1 = product1.CreateReferenceFromName("Product1/CATPart_1_new.1/!Product1/CATPart_1_new.1/")

Dim constraint1 As Constraint
Set constraint1 = constraints1.AddMonoEltCst(catCstTypeReference, reference1)

constraint1.ReferenceType = catCstRefTypeFixInSpace

'The document just opened is the active document.
'Save the active document and then close it.
'CATIA.ActiveDocument.Save()
'CATIA.ActiveDocument.Close()

End Sub

So, you have much more work to do, be careful if you are working on UNIX or Windows (the script language is a little bit different and...good luck with scripting.

Regards
Fernando
 
Also, if you changed the file names when you changed the parts, you will have the same problem. Short of a macro like Ferdo showed, you will have to manually replace the files.
 
Hi Guys,
Thanks for all the help. I managed to replace the parts quite quickly using, edit -> links -> find. It would point to the new files and have the paths correct as well. So instead of replacing each item, I just re-routed it, in a sense. I will play around with you suggestions though as well. for the meen time i'm sorted.
Many Thanks,
Gary. :)
 
Status
Not open for further replies.
Back
Top