This question has been flagged
146 Vistas

Este UCS tem como objetivo permitir que se mova e apague conectores de forma manual:


1 - Selecionamos a peça que queremos editar e de seguida ativamos a opção CON) EDITAR

2 - Esta opção ira disponibilizar uma lista com os conectores e uma numeração no modelo para os identificar


2 - Podemos usar o parâmetro CON.1) MOVER para mover o conector 1 e o parâmetro CON.1) APAGAR para apagar o conector 1. 

3 - No fim desativamos a opção CON) NUMEROS para ocultar os numeros.

Lista de UCS

UCS - BIT_GEN - EDITAR CONEXÕES 1

;CONECTORES
FOR EACH * PART

IF OBJECT != 17 THEN
EXIT
END IF


;EDITAR CONEXÕES
If EDIT_CONNECTORS = null then
EDIT_CONNECTORS<bool> := FALSE
End if
EDIT_CONNECTORS<Style> := 1
EDIT_CONNECTORS<Desc> = 'CON) EDITAR'

IF EDIT_CONNECTORS THEN

;NUMEROS
If SHOW_NUMBER_CON = null then
SHOW_NUMBER_CON<bool> := TRUE
End if
SHOW_NUMBER_CON<Style> := 1
SHOW_NUMBER_CON<Desc> = 'CON) NUMEROS'

COUNTER<INT> := 1

WHILE THIS.S_HDWCON@{COUNTER}.X != NULL DO

;OFFSET_CON_{counter}
If OFFSET_CON_{counter} == null then
OFFSET_CON_{counter}<MEAS> := 0
End if
OFFSET_CON_{counter}<Style> := 1
OFFSET_CON_{counter}<Desc> = 'CON.{counter}) MOVER'

;DELETE_CON_{counter}
If DELETE_CON_{counter} == null then
DELETE_CON_{counter}<BOOL> := FALSE
End if
DELETE_CON_{counter}<Style> := 1
DELETE_CON_{counter}<Desc> = 'CON.{counter}) APAGAR'

COUNTER<INT> += 1

END WHILE

ELSE

DELETE SHOW_NUMBER_CON

COUNTER<INT> := 1

WHILE THIS.S_HDWCON@{COUNTER}.X != NULL DO

DELETE OFFSET_CON_{counter}
DELETE DELETE_CON_{counter}

COUNTER<INT> += 1

END WHILE

END IF

UCS - BIT_GEN - EDITAR CONEXÕES 2

;CONECTORES
FOR EACH S_HDWCON PART

public CON_NUMBER_Y<MEAS> = 1MM ;N) ALTURA NUMERO
public CON_NUMBER_Z<MEAS> = 60MM ;N) LARGURA NUMERO
public CON_NUMBER_X<MEAS> = 30MM ;N) ESPESSURA NUMERO
public CON_NUMBER_AF<MEAS> = 5MM ;N) AFASTAMENTO NUMERO

IF EDIT_CONNECTORS = FALSE THEN
EXIT
END IF

COUNTER<INT> := 1

WHILE :.S_HDWCON@{COUNTER}.Y != NULL DO

IF :.S_HDWCON@{COUNTER}.Y = Y AND :.S_HDWCON@{COUNTER}._FACEWP = _FACEWP THEN

_NUMBER<INT> := COUNTER

;ADICIONAR NUMERO
Dim BLACK as New Part
BLACK.Visible<bool> = True
BLACK.DX<MEAS> := CON_NUMBER_X
BLACK.DZ<MEAS> := CON_NUMBER_Z
BLACK.DY<MEAS> := CON_NUMBER_Y
BLACK.X<MEAS> = - CON_NUMBER_X / 2 ;:.S_HDWCON@{COUNTER}.PABSX
BLACK.Y<MEAS> = 0 ;THIS.S_HDWCON@{COUNTER}.PABSY
BLACK.Z<MEAS> = 0 ;THIS.S_HDWCON@{COUNTER}.PABSZ
BLACK.AX<deg> := 0
BLACK.AY<deg> := 180
BLACK.AZ<deg> := 180
BLACK.QTY = :SHOW_NUMBER_CON

;IMAGEM NUMERO
If COUNTER = 1 then
BLACK.LibPart = 'Numeros\1'
end if

If COUNTER = 2 then
BLACK.LibPart = 'Numeros\2'
end if

If COUNTER = 3 then
BLACK.LibPart = 'Numeros\3'
end if

If COUNTER = 4 then
BLACK.LibPart = 'Numeros\4'
end if

If COUNTER = 5 then
BLACK.LibPart = 'Numeros\5'
end if

If COUNTER = 6 then
BLACK.LibPart = 'Numeros\6'
end if

If COUNTER = 7 then
BLACK.LibPart = 'Numeros\7'
end if

If COUNTER = 8 then
BLACK.LibPart = 'Numeros\8'
end if

If COUNTER = 9 then
BLACK.LibPart = 'Numeros\9'
end if

if COUNTER > 9 and COUNTER < 20 then
BLACK.LibPart = 'Numeros\1'
end if

if COUNTER = 20 then
BLACK.LibPart = 'Numeros\2'
end if

;SE FOR DE 2 DIGITOS
if COUNTER > 9 then

;BLACK.Y<MEAS> := + CON_NUMBER_AF
BLACK.X<MEAS> -= CON_NUMBER_AF

;ADICIONAR DESENHO
Dim BLACK as New Part
BLACK.Visible<bool> = True
BLACK.DX<MEAS> := CON_NUMBER_X
BLACK.DZ<MEAS> := CON_NUMBER_Z
BLACK.DY<MEAS> := CON_NUMBER_Y
BLACK.X<MEAS> := 0;THIS.S_HDWCON@{COUNTER}.PABSX
BLACK.Y<MEAS> := 0;THIS.S_HDWCON@{COUNTER}.PABSY
BLACK.Z<MEAS> := 0;THIS.S_HDWCON@{COUNTER}.PABSZ
BLACK.AX<deg> := 0
BLACK.AY<deg> := 180
BLACK.AZ<deg> := 180
BLACK.QTY = :SHOW_NUMBER_CON

if COUNTER = 10 then
BLACK.LibPart = 'Numeros\0'
end if

if COUNTER = 11 then
BLACK.LibPart = 'Numeros\1'
end if

if COUNTER = 12 then
BLACK.LibPart = 'Numeros\2'
end if

if COUNTER = 13 then
BLACK.LibPart = 'Numeros\3'
end if

if COUNTER = 14 then
BLACK.LibPart = 'Numeros\4'
end if

if COUNTER = 15 then
BLACK.LibPart = 'Numeros\5'
end if

if COUNTER = 16 then
BLACK.LibPart = 'Numeros\6'
end if

if COUNTER = 17 then
BLACK.LibPart = 'Numeros\7'
end if

if COUNTER = 18 then
BLACK.LibPart = 'Numeros\8'
end if

if COUNTER = 19 then
BLACK.LibPart = 'Numeros\9'
end if

if COUNTER = 20 then
BLACK.LibPart = 'Numeros\0'
end if

end if

;MOVER

Y += :OFFSET_CON_{COUNTER}

;APAGAR

IF :DELETE_CON_{counter} = TRUE THEN

QTY := 0

ELSE

QTY := 1

END IF

END IF

COUNTER<INT> += 1

END WHILE




Avatar
Descartar