• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. PCB Design
  3. OrCAD Symbol Color Macro

Stats

  • Locked Locked
  • Replies 2
  • Subscribers 164
  • Views 13955
  • Members are here 0
More Content
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

OrCAD Symbol Color Macro

ZetaZero
ZetaZero over 8 years ago

Hi,

I am wondering why the following macro is setting the custom property "PPVS" perfectly on the selected symbols, but it does not change the color as intended:

SUB PPVS_100_100_50_100
  'MACROMENU PPVS_100_100_50_100
  'MACROKEY CTRL+ALT+1
  'MACRODESCRIPTION
SetProperty "PPVS", "100 100 50 100"
SetProperty "Color", 8
UnSelectAll
END SUB

I have tried a lot of other syntaxes ("Color", "8";   "Color", "255,0,0",   etc.) and I just can't get it to work.

Obviously, my purpose is to set the PPVS value and change the color to red so that I know that the property is set on that component. Could someone please give me a clue? :)

Thanks,

John S.

  • Cancel
Parents
  • ZetaZero
    ZetaZero over 8 years ago

    Update:

    Note that it seems that all 3 RGB places need to be right justified, 3 characters long. So, for instance "RGB(  0,255,  0)" for green.

    Also, it appears that the color has to be in the drop down list to work, so "RGB(137,105,189)" won't change the color of a symbol.

    Finally, for a simple, custom input value the following works:

    SUB PPVS_CUSTOM
    'MACROMENU PPVS_CUSTOM
    'MACROKEY CTRL+ALT+9
    'MACRODESCRIPTION
    SetProperty "PPVS", InputBox$("Separate by spaces", "PPVS Values", R$)
    SetProperty "Color", "RGB( 0,255, 0)"
    UnSelectAll
    END SUB

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • ZetaZero
    ZetaZero over 8 years ago

    Update:

    Note that it seems that all 3 RGB places need to be right justified, 3 characters long. So, for instance "RGB(  0,255,  0)" for green.

    Also, it appears that the color has to be in the drop down list to work, so "RGB(137,105,189)" won't change the color of a symbol.

    Finally, for a simple, custom input value the following works:

    SUB PPVS_CUSTOM
    'MACROMENU PPVS_CUSTOM
    'MACROKEY CTRL+ALT+9
    'MACRODESCRIPTION
    SetProperty "PPVS", InputBox$("Separate by spaces", "PPVS Values", R$)
    SetProperty "Color", "RGB( 0,255, 0)"
    UnSelectAll
    END SUB

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
No Data
Cadence Guidelines

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information