Files
omagoffice/EgtStoneLib/EstProject.vb
T
Dario Sassi 38f034a675 OmagOFFICE :
- aggiunta gestione import Dxf
- migliorie pezzi in parcheggio tra più macchinate.
2017-04-18 06:29:06 +00:00

57 lines
1.9 KiB
VB.net

Imports EgtUILib
Module EstProject
Public Function FilterNge() As Boolean
' Rimuovo eventuali gruppi con livello System
Dim nId As Integer = EgtGetFirstGroupInGroup(GDB_ID.ROOT)
While nId <> GDB_ID.NULL
' Recupero il prossimo gruppo
Dim nNextId = EgtGetNextGroup(nId)
' Verifico il livello e se necessario cancello
Dim nLevel As Integer = GDB_LV.USER
EgtGetLevel(nId, nLevel)
If nLevel = GDB_LV.SYSTEM Then
EgtErase(nId)
End If
' Passo al prossimo gruppo
nId = nNextId
End While
' Processo i sottogruppi, se di livello System li rimuovo altrimenti ne cancello il nome
Dim nGrpId As Integer = EgtGetFirstGroupInGroup(GDB_ID.ROOT)
While nGrpId <> GDB_ID.NULL
' Ciclo sui sottogruppi
Dim nSubId As Integer = EgtGetFirstGroupInGroup(nGrpId)
While nSubId <> GDB_ID.NULL
' Recupero il prossimo sottogruppo
Dim nNextSubId = EgtGetNextGroup(nSubId)
' Verifico il livello, eventuale cancellazione o rimozione nome
Dim nLevel As Integer = GDB_LV.USER
EgtGetLevel(nSubId, nLevel)
If nLevel = GDB_LV.SYSTEM Then
EgtErase(nSubId)
Else
EgtRemoveName(nSubId)
End If
nSubId = nNextSubId
End While
' Passo al prossimo gruppo
nGrpId = EgtGetNextGroup(nGrpId)
End While
Return True
End Function
Public Sub AdjustFlatParts()
' Ciclo sui pezzi
Dim nPartId As Integer = EgtGetFirstPart()
While nPartId <> GDB_ID.NULL
' Sistemo il pezzo
AdjustFlatPart(nPartId)
' Passo al pezzo successivo
nPartId = EgtGetNextPart(nPartId)
End While
End Sub
End Module