I have created zones with API but those zones doesn't display any parts of my assembly.
Here is my code :
Public Function CreateZone(ByVal ObjDoc As SolidEdgeFramework.SolidEdgeDocument, _ ByVal ZoneName As string, _ ByVal Interference As boolean, _ ByVal P1X As Double, _ ByVal P1Y As Double, _ ByVal P1Z As Double, _ ByVal P2X As Double, _ ByVal P2Y As Double, _ ByVal P2Z As Double, _ ) As Boolean CreateZone = True Try Dim Zones As SolidEdgeAssembly.Zones = ObjDoc.Zones Dim a_Zone As SolidEdgeAssembly.Zone = Zones.Add(P1X, P1Y, P1Z, P2X, P2Y, P2Z) a_Zone.Name = ZoneName a_Zone.Overlap = Interference a_Zone = Nothing Catch ex As Exception CreateZone = False End Try End Function
Can you help me with this problem ?
I am on ST 6 and it is working for me partially.
The zone box appears but the zone name does not appear in the zone tree node.
I switched to a different tab and back to the Select Tools tab to get the zone name listed under the zones tree node. I believe this could be the reason for even a_Zone.ShowOnlyParts() and objDoc.UpdateAll not to work.
Thanks Tushar for those infos.
I'm in ST7 and the zone are correctly displayed in the graphic window and in the zone treenode.
There seems to be problem when calculating, maybe by a query, the components taht match the zone so it doesn't display anything.
If I select a zone then modify its definition and change the size in Solid Edge then it display correctly the components.