I would like to bring this discussion to surface again.
I am trying similar workflow with iAssemblies.
In Inventor 2013
Manually : I do a rightclick on level of Details and New Substitute > Derived Assembly
That adds the substitute and creates it as I go. I have to again manually Suppress/Exclude
from Derived assembly dialog box.
I tried to automate this BUT
' Open the factory document
Dim oFacDoc As AssemblyDocument
Set oFacDoc = ThisApplication.ActiveDocument
Dim oCompdef As AssemblyComponentDefinition
Set oCompdef = oFacDoc.ComponentDefinition
Dim oiPrtFac As iAssemblyFactory
Set oiPrtFac = oCompdef.iAssemblyFactory
'Get filename to get foldername
Dim Filename As String
Filename = oFacDoc.FullDocumentName
Dim opath As String
opath = Left(Filename, InStrRev(Filename, "\"))
Dim oRow As iAssemblyTableRow
Set oRow = oiPrtFac.DefaultRow
Dim UnitNum As String
UnitNum = oRow.MemberName
Dim MasterLOD As LevelOfDetailRepresentation
Set MasterLOD = oCompdef.RepresentationsManager.LevelOfDetailRepre
1.'Add Subtitute : I think this only adds the existing substitute does not create one. , Correct ?
Dim Subtitute As LevelOfDetailRepresentation
Set Subtitute = oCompdef.RepresentationsManager. _
LevelOfDetailRepresentations.AddSubstitute(opath & "Substitutes\" & UnitNum & ".ipt", False)
2.Is there a way by which I can replicate the steps as I do manually ?
Hello Sanjay, In your previous post you had
' ~~~~ OPTIONS ~~~~
oDerivedAssyDef.ScaleFactor = 1
oDerivedAssyDef.ReducedMemoryMode = True
'Include all available components ..................(from old code)
3. 'In my case, I want to exclude the excluded components as per the iassembly definition.
' Can you please illustrate that ?
Precisely: I am trying to create a Substitute LOD for each member in iassembly.
So that the overall assembly will be easier.
Access a broad range of knowledge to help get the most out of your products and services.
Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.
Upgrading to a 2015 product? Make sure to check these out 1st!