Hi @amalikAHJNB. As far as I know, the same restrictions are still in effect. Still in the 2026 Inventor API, most of the WorkPlanes.Add... type methods will only work in Parts, not in assemblies, except for the WorkPlanes.AddFixed method, same as before. And as mentioned in the online help for that method, when we create a WorkPlane with that method in an assembly, its definition is a AssemblyWorkPlaneDef type object. And as you can see in the online help page for that object type, it does have properties for all 3 inputs that were required when defining it, but they are all 'ReadOnly' properties. But it does also have the GetData & PutData methods, where the PutData method actually lets us 'change' those inputs, if necessary. But we can also use its Constraints property to access the collection of assembly constraints associated with that WorkPlane, if any. Then, if we wanted to, we could change something about one or more of those constraints. And yes, the process shown in Message 4 above does still work to create an 'offset' WorkPlane in an assembly. Below is an updated iLogic rule example of the same process which I just tested in Inventor 2024.4.1 and it worked just fine. I made sure to add comments in the code too, to help guide folks about what the next line(s) of code are trying to do.
Sub Main
'get current assembly
Dim oADoc As AssemblyDocument = TryCast(ThisDoc.Document, Inventor.AssemblyDocument)
If oADoc Is Nothing Then Return
'get its 'definition' (where model geometry gets created)
Dim oADef As AssemblyComponentDefinition = oADoc.ComponentDefinition
'get its WorkPlanes collection
Dim oWPlanes As Inventor.WorkPlanes = oADef.WorkPlanes
'get the origin 'XY Plane', which is always Item 3
Dim oXY_WPlane As Inventor.WorkPlane = oWPlanes.Item(3)
'<<< define a 3D point, and 2 directions for the new WorkPlane we want to create >>>
Dim oP3D As Inventor.Point = oADef.WorkPoints.Item(1).Point.Copy()
oP3D.Z = 35 'units not specified, so they will be understood as centimeters
Dim oX_Dir As Inventor.UnitVector = oADef.WorkAxes.Item(1).Line.Direction
Dim oY_Dir As Inventor.UnitVector = oADef.WorkAxes.Item(2).Line.Direction
'create a 'fixed' WorkPlane using those inputs
Dim oNewWPlane As Inventor.WorkPlane = oWPlanes.AddFixed(oP3D, oX_Dir, oY_Dir)
'turn on its AutoResize to make it more visible
oNewWPlane.AutoResize = True
'create a Flush constraint from the origin XY Plane to the new WorkPlane, which actually constrains the offset
Dim oFlushConst As Inventor.FlushConstraint = oADef.Constraints.AddFlushConstraint(oXY_WPlane, oNewWPlane, "WorkPlaneOffset1 = 35 cm")
'this just updates the current view, so you can immediately see the results
ThisApplication.ActiveView.Fit(True)
End Sub
If this solved your problem, or answered your question, please click ACCEPT SOLUTION .
Or, if this helped you, please click (LIKE or KUDOS) 👍.
Wesley Crihfield

(Not an Autodesk Employee)