реклама на сайте
подробности

 
 
> Таблица выводов земли и питания ?
Jul
сообщение Oct 24 2006, 02:49
Сообщение #1


Местный
***

Группа: Свой
Сообщений: 476
Регистрация: 15-12-04
Из: СПб
Пользователь №: 1 481



Символы (УГО) и схема созданы в PowerLogic. При этом стандартные земля и питание определены как Signal Pins, и на схеме эти пины не появятся. А по ГОСТу их надо показать, например, в виде таблицы.
Как это сделать ?
(Можно просто нарисовать таблицу и вписать ручками, но слишком велика вероятность ошибок, хочется это получить от PowerLogic)
Go to the top of the page
 
+Quote Post
 
Start new topic
Ответов
helge12
сообщение Nov 10 2006, 10:16
Сообщение #2


Участник
*

Группа: Участник
Сообщений: 25
Регистрация: 27-12-04
Пользователь №: 1 692



Jul попробуй вот этот скрипт.

'This script add SignalPins tab.
'It will create reports in Text format.
'For better look, turn off 'Word Wrap' item in the Edit menu of Notepad and use Courier or any other fixed width font.

'Arrays of column name and widths. You can modify them to rename, shrink, or expand columns
Const Columns = Array("Поз.", "Вывод", "Цепь")
Const Widths = Array( 8, 6, 6, 22)

Sub Main
fname = ActiveDocument
If fname = "" Then
fname = "Untitled"
End If
report = DefaultFilePath & "\" & "Part Report1.rep"
Open report For Output As #1
'Output report header
Print #1, "Part Report for "; fname
Print #1

StatusBarText = "Generating report..."
'Output table header
CurCol = 0
For i = 0 to UBound(Columns)
OutCell Columns(i)
Next
Print #1
'Output table rows
For Each part in ActiveDocument.Components
CurCol = 0
If GetSignalPins(part).Count = 0 Then GoTo LL
For Each aPin In GetSignalPins(part)
CurCol = 1
OutCell2 part.Name
OutCell1 aPin.Number
OutCell3 ObjName(aPin.Net)

Print #1
Next aPin
Print #1
Print #1
LL:
Next part

Print #1

StatusBarText = ""
Close #1
'Do not forget quotes for file name!
Shell "Notepad " & Chr(34) & report & Chr(34), 1
End Sub


'Returns collection of signal pins in the given part
Function GetSignalPins(obj As Object, Optional Sorted As Boolean = False)
Set GetSignalPins = ActiveDocument.GetObjects(0)
For Each aPin In obj.Pins
If aPin.Gate Is Nothing And Not aPin.Net Is Nothing Then
GetSignalPins.Add aPin
End If
Next
If Sorted Then GetSignalPins.Sort
End Function

'Pins are not sorted by default (performance issue), so sort them explicitly in report
Function GetSortedPins(obj As Object)
Set GetSortedPins = obj.Pins
GetSortedPins.Sort
End Function

Function ObjName (obj As Object)
ObjName = IIf(obj Is Nothing, "", obj)
End Function

Dim CurCol As Integer 'Current column index staring from 0

Sub OutCell (txt As String)
w = Widths(CurCol)
txt = Left(txt, w)
Print #1, txt; Space(w - Len(txt)); " | ";
CurCol = CurCol + 1
End Sub
Sub OutCell1 (txt As String)
w = Widths(CurCol)
txt = Left(txt, w)
Print #1, txt; Space(w - Len(txt)); "= ";
CurCol = CurCol + 1
End Sub
Sub OutCell2 (txt As String)
w = Widths(CurCol)
txt = Left(txt, w)
Print #1, txt; Space(w - Len(txt)); "( ";
CurCol = CurCol + 1
End Sub
Sub OutCell3 (txt As String)
w = Widths(CurCol)
txt = Left(txt, w)
Print #1, txt; Space(w - Len(txt)); " ) ";
CurCol = CurCol + 1
End Sub
Go to the top of the page
 
+Quote Post
Jul
сообщение Nov 11 2006, 19:51
Сообщение #3


Местный
***

Группа: Свой
Сообщений: 476
Регистрация: 15-12-04
Из: СПб
Пользователь №: 1 481



Спасибо, получается отлично !!!
Go to the top of the page
 
+Quote Post



Reply to this topicStart new topic
1 чел. читают эту тему (гостей: 1, скрытых пользователей: 0)
Пользователей: 0

 


RSS Текстовая версия Сейчас: 24th July 2025 - 05:06
Рейтинг@Mail.ru


Страница сгенерированна за 0.01471 секунд с 7
ELECTRONIX ©2004-2016