Query_Lang-PCBFunctions_Parameters_CompParameterValueCompParameterValue_AD

您正在阅读的是 18.1. 版本。关于最新版本,请前往 Query_Lang-PCBFunctions_Parameters_CompParameterValue((CompParameterValue))_AD 阅读 21 版本
Applies to Altium Designer versions: 17.0, 17.1, 18.0, 18.1, 19.0, 19.1, 20.0, 20.1 and 20.2

Parent page: PCB Query Functions - Parameters

Summary

Returns the string Value of a PCB component Parameter, which can be tested to return PCB components that comply to the Query.

Syntax

CompParameterValue(ParameterName : String) : String

Example Usage

CompParameterValue(‘Design Item Id’) Like 'CAP*'
Returns all components that incorporate the Design Item Id Parameter which has a Value string beginning with CAP, such as CAP-NP-100nF-50V-0805, CAP-P-22uF-10V-MCCT-B, etc. The associated child objects of a complying component object, such as tracks, arcs, pads, text etc, are also returned.

CompParameterValue(‘Design Item Id’) Like '*0805*'
Returns all components and their associated child objects where the Design Item Id Parameter has a Value string which includes 0805.

StrToNumber(CompParameterValue('VoltageRating'),V)  >  50
Returns all components and their associated child objects where the VoltageRating Parameter Value is greater than 50 volts. The string Value returned by CompParameterValue is converted to a number for the comparison by the unit-aware StrToNumber function.

可用的功能取决于您的 Altium Designer 软件订阅级别