Dim doc As Document
Dim tgtName As String
Dim refName As String
Dim tgtComp As Component
Dim refComp As Component
Dim dx As Double
Dim dy As Double
Dim rotation As Double
Dim page_count As Double
Dim part_count As Double
Dim input_number As String
Sub Main
Dim ret As Integer
part_count = 0
input_number = InputBox("RefDes : ", "Target") 'ref number Input
tgtname = "c" + input_number 'Step 1 c part
dx = 0 'x position
dy = 10.5 'y position
rotation = 270 'rotation
Call ApplyMove()
tgtname = "c" + CStr(Val(input_number) + 1) 'next part
dx = 0
dy = 10.5
rotation = 270
Call ApplyMove()
End Sub
Sub ApplyMove()
Dim doc As Document
Dim tgtComp As Component
Set doc = Application.ActiveDocument
Set tgtComp = doc.Components(tgtName)
tgtComp.Move dx, dy 'component move
tgtComp.Orientation = rotation 'coponent rotation
MsgBox "[" & tgtName & "] moved by (" & dx & ", " & dy & ")"
End Sub
'Hardware' 카테고리의 다른 글
PADS 동일한 배치 자동화. 스크립트 (0) | 2025.04.29 |
---|---|
PADS 창 짤리는 문제 (0) | 2024.10.17 |
변경된 회로 Pads에 적용하기 (1) | 2024.10.08 |
PADS에서 다층 기판 셋팅하기 (0) | 2024.10.07 |
PADS에서 ORCAD Netlist 불러오기. (4) | 2024.10.07 |