Is there a way to save a component definition?

Is there a way to save a component definition?

JBEDsol
Collaborator Collaborator
545 Views
3 Replies
Message 1 of 4

Is there a way to save a component definition?

JBEDsol
Collaborator
Collaborator

I have a code that uses assembly component definitions a lot.  When I try to save as I get errors.  If I'm starting w/ a component def how do I get the documents so that I can save the file?

0 Likes
546 Views
3 Replies
Replies (3)
Message 2 of 4

JBEDsol
Collaborator
Collaborator

I tried saving the document with this line.

 

asmDoc.SaveAs(strFileName, False)

 

I get an error stating 

Failed to create folder,""

 

I've no idea what's going on.

 

I got the same thing with the line

asmDef.Parent.SaveAs(strFileName, False)

 

0 Likes
Message 3 of 4

snappyjazz
Collaborator
Collaborator

Hello@JBEDsol

If I understand what you're after, the document is part of the component definition. You'll want to convert that to an assembly document. From that assembly document you can save.

 

 

Dim SavDoc as Inventor.AssemblyDocument = AsmCompDef.Document
SavDoc.Saveas("FileName",False)

 

 

0 Likes
Message 4 of 4

dgreatice
Collaborator
Collaborator

where did you get Assembly Component Definition? Drawing?

Please use the ACCEPT AS SOLUTION or KUDOS button if my Idea helped you to solve the problem.

Autodesk Inventor Professional Certified 2014
0 Likes