Message 1 of 3

Not applicable
03-31-2021
05:28 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am trying to get this code to create the pathways a lookup the member in the folders as shown. I keep getting the same error the code run fine once then it breaks. The code looks for the right floor using the width and length parameters in the assembly.
Sub Main Call floor Call roof End Sub Sub floor oFloor = ThisDoc.Document.ComponentDefinition.Occurrences.Item(1).Name CFloor = "Floor - W" & FLOOR_WIDTH & " - D" & FLOOR_DEPTH & " - T44" oPath = ThisDoc.Path & "\Floor - iAssembly - v1\" filepath = oPath & CFloor & ".iam" Component.Replace(oFloor, filepath, False) End Sub Sub roof oRoof = ThisDoc.Document.ComponentDefinition.Occurrences.Item(2).Name 'Roof ApexA - W2500 x D2000 CRoof = "Roof ApexA - W" & FLOOR_WIDTH & " x D" & FLOOR_DEPTH RPath = ThisDoc.Path & "\Roof (45) - Apex Type A\" Rfilepath = RPath & CRoof & ".iam" Component.Replace(oRoof, Rfilepath, False) End Sub
any ideas on how I can solve this error?
Thanks
Harry
Solved! Go to Solution.