How to replace part in Orcad using TCL syntax "ReplaceInst"

61 views
Skip to first unread message

faysal

unread,
Oct 3, 2017, 11:17:26 AM10/3/17
to Orcad User Group

Hi Group,

I am looking to change some components (out of many) to new library part. If doing so with Orcad cache then it will change all parts regardless of the reference designator. I tried to use below command with no success. Nothing happened in the Orcad. Moreover, below syntax does not contain old part field so I am not sure which part will get replace until it works.


ReplacePart(libName, pkgName, partName, device)

I also tried below command but Orcad flags error as " 1]No matching function for overloaded 'DboPage_ReplaceInst'". 

Appreciate if someone could shed some light on this code. I put so much time with below syntax without any success. There is no example given in the documentation as well. 

set src_pkg_name "CAPACITOR_NP"
set src_pkg_name [DboTclHelper_sMakeCString] 

set lib_part "LIBRARY.OLB/CAPACITOR_NP"
set lib_part [DboTclHelper_sMakeCString] 

set device [$lPlacedInst GetDevice $lStatus]

$lPage ReplaceInst $lPlacedInst $src_pkg_name $lib_part $device $lStatus 0 0 0 1

Reply all
Reply to author
Forward
0 new messages