分类
program

skill编写的cadence打label增强程序

这个脚本的代码是费了很多事找到的,感觉还行,复制红色部分存为 spHiCreateMultiLabel.il  。 使用方法脚本中很详细的介绍了。 纯属他人劳动成果,请勿滥用!

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;; Create Multiple Labels ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; /*===================================================================================
Important Notice:
NA. =====================================================================================
How to Use:
1.Load file "spHiCreateMultiLabel.il"
2.Enter interactive procedure name "spHiCreateMultiLabel()" in CIW.
3.Select correct layer in your LSW.
4.An option form will be displayed. If not , press "F3".
4.Fill data in those fields based on your requirment.
6.Click on your layout window to determine the origin of your labels.
=====================================================================================
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Author:Spark Su
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Revision History:
1.0 22-Oct-2006
Initial
2.0 04-Dec-2006
1. Delete TextLayer filed. Layer should be selected in LSW.
2. Change local variable names.
3.0 09-May-2008
1. Add interactive procedure spHiCreateMultiLabel()
2. Reduce global variables.
=====================================================================================
Global User Defined Procedures in This Script:
spHiCreateMultiLabel()
spHiCreateMultiLabelPtsDone()
-------------------------------------------------------------------------------------
Invoked Shared Global User Defined Procedures:
NA.
-------------------------------------------------------------------------------------
Global Variables:
spHiCreateMultiLabelOptionForm
=====================================================================================
End of readme.
===================================================================================*/ procedure(spHiCreateMultiLabel()
;--------------------------------------------------------------------------------
if(!boundp('spHiCreateMultiLabelOptionForm) then
hiCreateOptionsForm(
'spHiCreateMultiLabelOptionForm
"Create Label"
list(
hiCreateStringField(
?name 'spFieldTextMain
?prompt "Main Text"
)
hiCreateIntField(
?name 'spFieldNumStart
?prompt "From"
?value nil
?defValue 0
?range '(0 32767)
)
hiCreateIntField(
?name 'spFieldNumEnd
?prompt "To"
?value nil
?defValue 0
?range '(0 32767)
)
hiCreateIntField(
?name 'spFieldNumStep
?prompt "Step"
?value nil
?defValue 1
?range '(-1024 1024)
)
hiCreateFloatField(
?name 'spFieldFontSize
?prompt "FontSize"
?value nil
?defValue 0.5
?range '(0 255)
)
hiCreateCyclicField(
?name 'spFieldFontName
?prompt "FontName"
?defValue "stick"
?choices list("stick" "roman")
)
hiCreateCyclicField(
?name 'spFieldDirection
?prompt "Direction"
?defValue "Vertical"
?choices list("Vertical" "Horizontal")
)
hiCreateCyclicField(
?name 'Modeselect
?prompt "Mode"
?defValue "Auto"
?choices list("Auto" "Manual")
)
hiCreateFloatField(
?name 'spFieldPitch
?prompt "Pitch"
?value nil
?range '(-1024 1024)
)
hiCreateCyclicField(
?name 'spFieldJustification
?prompt "Justification"
?defValue "centerCenter"
?choices list("lowerLeft" "centerLeft" "upperLeft" "lowerCenter" "centerCenter"
"upperCenter" "lowerRight" "centerRight" "upperRight" )
)
hiCreateCyclicField(
?name 'spFieldJoint
?prompt "Joint"
?choices list("< >" "[ ]")
)
hiCreateCyclicField(
?name 'spFieldRotation
?prompt "Rotation"
?choices list("0" "90" "180" "270")
)
)
nil
)
);end if
;-------------------------------------------------------------------------------- ;--------------------------------------------------------------------------------
;enterPoint
if(enterPoint(
?prompts list( "Click to enter the first label location")
?doneProc "spHiCreateMultiLabelPtsDone"
?form spHiCreateMultiLabelOptionForm)
then t
else nil
);end if
);end procedure
;--------------------------------------------------------------------------------
;--------------------------------------------------------------------------------
procedure(spHiCreateMultiLabelPtsDone(w done pts)
let(( cv TextMain numstart numend loopstep direction
Pitch FontSize FontName Justification Rotation
LswEntryLayer loopstart loopend Joint x y
JointLeft JointRight TextTmp xPitch yPitch
ptsLabel Text) if(done then
cv=deGetCellView()
TextMain=spHiCreateMultiLabelOptionForm->spFieldTextMain->value
numstart=spHiCreateMultiLabelOptionForm->spFieldNumStart->value
numend=spHiCreateMultiLabelOptionForm->spFieldNumEnd->value
loopstep=spHiCreateMultiLabelOptionForm->spFieldNumStep->value
direction=spHiCreateMultiLabelOptionForm->spFieldDirection->value
Mode=spHiCreateMultiLabelOptionForm->Modeselect->value
Pitch=spHiCreateMultiLabelOptionForm->spFieldPitch->value
FontSize=spHiCreateMultiLabelOptionForm->spFieldFontSize->value
FontName=spHiCreateMultiLabelOptionForm->spFieldFontName->value
Justification=spHiCreateMultiLabelOptionForm->spFieldJustification->value
Rotation=spHiCreateMultiLabelOptionForm->spFieldRotation->value LswEntryLayer=leGetEntryLayer() loopstart= numstart
loopend= (numend-numstart)/loopstep
Joint=spHiCreateMultiLabelOptionForm->spFieldJoint->value
x=car(car(pts))
y=car(cdr(car(pts))) JointLeft=""
JointRight=""
if( Joint=="< >"
then
JointLeft="<"
JointRight=">"
else
JointLeft= "["
JointRight= "]"
);end if if( Mode=="Auto"
then
if( direction=="Vertical"
then
xPitch=0
yPitch=Pitch
else
xPitch=Pitch
yPitch=0
);end if for( i 0 loopend
sprintf(TextTmp "%d" i*loopstep+loopstart)
Text=strcat( TextMain JointLeft TextTmp JointRight )
ptsLabel=list(x y)
dbCreateLabel( cv LswEntryLayer ptsLabel Text Justification Rotation FontName FontSize)
x=x+xPitch
y=y+yPitch
);end for
else
for( i 0 loopend
sprintf(TextTmp "%d" i*loopstep+loopstart)
Text=strcat( TextMain JointLeft TextTmp JointRight )
ptsLabel=list(x y)
dbCreateLabel( cv LswEntryLayer ptsLabel Text Justification Rotation FontName FontSize)
xy=enterPoint(
;?doneProc "PtDone"
)
x=xCoord(xy)
y=yCoord(xy)
);end for
);end if
);end if
);end let
);end procedure
hiSetBindKey("Layout" "Ctrl<Key>l" "spHiCreateMultiLabel()")

以文档形式下载:http://u.115.com/file/cmfmn8q5#
spHiCreateMultiLabel.rar

“skill编写的cadence打label增强程序”上的10条回复

今天是我第一次上来这个网站,看了些有关版图的工具方面的知识,感觉挺有用的。
觉得楼主建的这个网站挺好的,以后再找些资料上来与大家共享。
这些各个主题的资料都是loongsky整理上来的吗?问一个,呵呵。

Superb content, my friend. You are truly a literary genius. This kind of article requires a great mind and a lot of research. I commend you on the hard work you put into this writing.

Pretty nice post. I just stumbled upon your blog and wanted to say that I have really enjoyed browsing your blog posts. In any case I’ll be subscribing to your feed and I hope you write again soon!

发表评论

电子邮件地址不会被公开。 必填项已用*标注