04-12-2022
12:51 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
04-12-2022
12:51 AM
Do you want to replace all occurrences of this 'cube.ipt'?
If you have the full filename of the part you can, to save a copy of this part:
Dim doc as PartDocument = ThisApplication.Documents.Open(filename)
Call doc.SaveAs(newFilename, true)
Then find the occurrence to be replaced in the assembly, either loop through the assemblies all (leaf) occurrences or access the occurrence by name (ItemByName) from the assemblies component definition. You can then replace it using:
ComponentOccurrence.Replace(filename, true) ' true/false depending on replace all
Contact me for custom app development info@basautomationservices.com. Follow below links to view my Inventor appstore apps.
Free apps: Smart Leader | Part Visibility Utility | Mate Origins
Paid apps: Frame Stiffener Tool | Constrain Plane Toggle | Property Editor Pro
Free apps: Smart Leader | Part Visibility Utility | Mate Origins
Paid apps: Frame Stiffener Tool | Constrain Plane Toggle | Property Editor Pro