×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Problem when importing STEP file into CATIA - Assembly combined into one PART & PARTBODY

Problem when importing STEP file into CATIA - Assembly combined into one PART & PARTBODY

Problem when importing STEP file into CATIA - Assembly combined into one PART & PARTBODY

(OP)


Hi pals, I am having an issue with importing STEP file consisting of an assembly into CATIA. It will always show the whole as one single PART, and every actual 'parts' of the assembly as PARTBODY. This makes it difficult to move things around/snapping.

Is there something I can do differently:
A) When saving STEP file from other software (but this would be sometimes beyond my control as some files were from clients)
B) When opening/importing STEP file from CATIA (perhaps there's a setting to control how I import files?)
C) Accept this fact & maybe there's a quick way to convert the hundreds of PARTBODY to PART? Any tips?

It's been really time consuming to work with STEP files when this happens, I really appreciate if you have any guidance!bigears
Replies continue below

Recommended for you

RE: Problem when importing STEP file into CATIA - Assembly combined into one PART & PARTBODY

I think you have a "bad" STEP file that is causing this problem.

I recall someone wrote a program to convert multi-body CATPart files into assemblies. But this was all that I could find (and it contains a bad link to a program): https://www.eng-tips.com/viewthread.cfm?qid=242427

Maybe you will have better luck with your own search

RE: Problem when importing STEP file into CATIA - Assembly combined into one PART & PARTBODY

Hi.

I have two macros that are making this for me. As we have customized part numbers and sometimes vendors/suppliers give us irregular part numbers and weird names I use a rename macro that numbers every body from 1 to X (the last). After that I have a part-to-product macro I can run on this catpart with renamed bodies.
The only downside is you have to rename all your bodies for your desires, or you can twinkle the macro to not rename them or get the filename in a different way.

The end result is a CATProduct with CATParts inside but they all contain the imported dead geometry from the STEP file.

RE: Problem when importing STEP file into CATIA - Assembly combined into one PART & PARTBODY

Hi,
I found this script to convert a CATpart with bodies to a CATProduct, but I didn't test it.

CODE --> CATScript

'------------------------------------------------------------
' Makroname = KopyPARTtoPRODUCT.CATScript
'
'
' Author: 	Filippo Gozza
' Version:	V5R10, V5R12
'------------------------------------------------------------
' Konvertiert ein CATPart in ein CATProduct
' Alle Körper werden in CATPart's konvertiert
'------------------------------------------------------------

Language="VBSCRIPT"

Dim KomponenteNeu As Products
Dim KoerperName
Dim OpenKoerperName
Dim productDocument1 As Document
Dim Koerper  As Object
Dim QuellFenster As Window
Dim Letztekoerper
Dim UserSel As Selection


Sub CATMain()

	Dim Activdocu As Document
	
	'---------------------------------------------------
	' Neue Product
	'---------------------------------------------------
	Dim PosString As Long

	PartName = CATIA.ActiveDocument.Name

	Dim docu As Documents
	Set docu = CATIA.Documents

	Dim productDocu As Document
	Set productDocu = docu.Add("Product")
	
	Dim ProductNeu  As Product
	Set  ProductNeu = productDocu.Product

	PosString = InStr(1, PartName , ".CATPart")
	ProductNeu.PartNumber = Mid (PartName , 1 , PosString -1 )
	'------------------------------------------------------

	FensterNebeneinander()

	Set QuellFenster = CATIA.Windows.Item(1)
	QuellFenster.Activate

	Set Activdocu = CATIA.ActiveDocument
	Set productDocument1 = Activdocu.Part.Bodies

	Dim koerperAnzahl
	koerperAnzahl = productDocument1.count

	for i =1 to koerperAnzahl

		Set Koerper =  productDocument1.Item(i)
		KoerperName = Koerper.Name

		'Koerper kopieren
		Activdocu.Selection.clear
		Activdocu.Selection.Add Koerper
		Activdocu.Selection.Copy
		Activdocu.Selection.clear

		'Part erzeugen und Koerper einfuegen
		Dim PartNeu As Product
		Set PartNeu =  ProductNeu.Products.AddNewComponent("Part", KoerperName )

		' Fenster mit neue Product activieren
		ProductNeu.Parent.Activate

		' Alle Parts suchen
		PartSuchen(ProductNeu.Parent)
		
		ProductNeu.Parent.Selection.Clear
		ProductNeu.Parent.Selection.Add  UserSel.Item(Letztekoerper).Value
		ProductNeu.Parent.Selection.Paste
		ProductNeu.Parent.Selection.Clear
		
	next

	' Product actualisieren
	ProductNeu.update

End Sub


Sub PartSuchen(oPartDoc1)
	Dim E As CATBSTR
	Dim Was (0)
	Was(0) = "Part"

	Set UserSel = oPartDoc1.Selection
	UserSel.Clear

	'Let us first fill the CSO with all the objects of the model
	UserSel.Search( "CATPrtSearch.PartFeature,all" )

	E = Selection.SelectElement2 ( Was, "Alle CATPart wählen", true )
	Letztekoerper = UserSel.Count

End Sub


Sub FensterNebeneinander()

	Dim windows1 As Windows
	Set windows1 = CATIA.Windows

	windows1.Arrange catArrangeTiledVertical

End Sub 

Hope it can help

Regards
Marc

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members! Already a Member? Login



News


Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close