Community
Inventor Forum
Welcome to Autodesk’s Inventor Forums. Share your knowledge, ask questions, and explore popular Inventor topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Replace Component for Derived Parts

7 REPLIES 7
Reply
Message 1 of 8
japike
1815 Views, 7 Replies

Replace Component for Derived Parts

Add an option in parts created from derived components to replace the derived component.

Peace,
Jeff
Inventor 2022
Labels (1)
7 REPLIES 7
Message 2 of 8
Curtis_Waguespack
in reply to: japike

This is a good suggestion, I do this now with an iLogic rule, but it would be nice to have it built in.

 

 
Dim oDoc as Document
oDoc = ThisDoc.Document
Dim oRefFile As FileDescriptor
Dim oOrigRefName As Object	

For Each oRefFile In oDoc.file.ReferencedFileDescriptors
'get the full file path to the original internal references
oOrigRefName = oRefFile.FullFileName

	'present a File Selection dialog
	Dim oFileDlg As inventor.FileDialog = Nothing
	InventorVb.Application.CreateFileDialog(oFileDlg)
	oFileDlg.InitialDirectory = oOrigRefName
	oFileDlg.CancelError = True
	On Error Resume Next
	oFileDlg.ShowOpen()
	If Err.Number <> 0 Then
	Return
	ElseIf oFileDlg.FileName <> "" Then
	selectedfile = oFileDlg.FileName
	End if
‘replace the reference
oRefFile.ReplaceReference (selectedfile)      
InventorVb.DocumentUpdate()
oOrigRefName = “”                                         
Next

iLogicVb.UpdateWhenDone = True

 

Message 3 of 8
japike
in reply to: japike

Wow!! That works great. Thanks Curtis.
Peace,
Jeff
Inventor 2022
Message 4 of 8
SteveMDennis
in reply to: japike

Curtis' solution works but we already are considering building it in. [US4564 ] Another workaroudn solution is to rename the file you derived FROM and open the derived part. When you get the resolve file dialog pick the one you want to replace the original source with.


Steve Dennis
Sr. Principal Engineer
Inventor
Autodesk, Inc.

Message 5 of 8
mrattray
in reply to: japike

Workarounds are not a solution. I just came here looking to post this same idea.

Just like this one: http://forums.autodesk.com/t5/Autodesk-Inventor/Derived-Part-Replace-Model-Reference/m-p/3062998#M40...

Mike (not Matt) Rattray

Message 6 of 8
dusan.naus.trz
in reply to: japike

Hi all,

 

thumbs up = Replace Component for Derived Parts

 

Please solve, change orientation for derived sketch

 

derived = I would like to tackle it together.

 

I use multiple solids. Then I use the derived sketch and I can not change orientation

 

Please write if you solve it. for steven.dennis

 

Cheers,

Dusan

Message 7 of 8
dusan.naus.trz
in reply to: japike

Message 8 of 8

Hi,

Version 2021 is already. In what century do you want to implement the code?-)))

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report