how can i open a .CATPART as .CATPRODUCT?
how will i be able to save a part file as a product file so that i ca run further simulations and stickers on my part model?
Practically Software wise not Possible,
But what i thinck your part file made some addional parts, so you want convert into Product file Right?
My Answer: Migration only Possible
First change to V4 and then again change to V5 using Migration Option with Result spec.
Brief Explain Here, just try
If this is result of migration from CV4 -> CV5, you have an option that allows to convert several Solids of one V4 model to a CV5 assembly with several parts. If you don't care about modelling history, you could try this:
- save your part as V4 model (save as - .model)
- Turn option ' CATPart by Solid' on in Compatibility-migration batch settings (tools-options)
- Use migration (Utility-MigrateV4toV5) batch to import V4 model to V5 assembly
=> job is done... I tested it and it works, but modelling history is more or less lost. You can use as SPEC or as RESULT options in impot.
You can use the below script to convert CATPart into CATProduct.
Dim Component As Products
Dim Pdoc1 As Document
Dim Body as Object
Dim SourceWindow As Window
Dim UserSel As Selection
Dim ActiveDocument As Document
Dim Pstring As Long
PartName = CATIA.ActiveDocument.Name
Dim Docs As Documents
Set Docs = CATIA.Documents
Dim prods1 As Document
Set prods1 = Docs.Add("Product")
Dim ProductNew As Product
Set ProductNew = prods1.Product
Pstring = InStr(1, PartName, ".CATPart")
ProductNew.PartNumber = Mid (PartName,1,Pstring -1)
Set SourceWindow = CATIA.Windows.Item(1)
Set ActiveDocument = CATIA.ActiveDocument
Set prods2 = ActiveDocument.Part.Bodies
Bodycount = prods2.count
for i =1 to Bodycount
Set Body = prods2.Item(i)
BodyName = Body.Name
Dim PartNew As Product
Set PartNew = ProductNew.Products.AddNewcomponent ("Part", BodyName)
Dim E As CATBSTR
Dim Was (0)
Was (0) = "Part"
Set UserSel = Opar1.Selection
Dim Windows1 As Windows
Set Windows1 = CATIA.Windows