• 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. Custom IC SKILL
  3. Selection rectangle color definition

Stats

  • Locked Locked
  • Replies 6
  • Subscribers 143
  • Views 17233
  • Members are here 0
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

Selection rectangle color definition

CADcasualty
CADcasualty over 5 years ago

I recently changed from 6.1.7 to 6.1.8. I have my world on a white background and all of my custom colors for schematic and layout views (defined in display.drf) carried across nicely, except for just a couple things that I previously needed to have defined in my .Xdefaults file. Specifically, I needed some settings in .Xdefaults to define e.g. the color of a dynamic selection rectangle. It's normally a yellow selection rectangle on a black background, but when I went all-white I changed it to red so I could see what I was selecting against the white background. Since using 6.1.8 I annoyingly have a yellow dynamic selection rectangle against my white background. Here's the corresponding stuff in my .Xdefaults file - I followed all of the instructions but I still get the yellow color. Any ideas? I did read through the documentation (ASCII Files Reference) but didn't see anything that jumped out.

! The following are for changing colors within virtuoso
! After changing the colors, do the following command:
! xrdb -merge ~/.Xdefaults
! and then log out and back in again.
! The -merge option prevents deleting desired settings that are not in the .Xdefaults file

! dragColor controls the highlight that appears when you hover over objects.
! dragColor defines the color of:
! the selection box you draw around objects
! the zoom box you draw to zoom in or out
! the outlines of objects you move, copy, or reshape
! the outlines of edges you stretch.
Opus.dragColor: red

! Controls the highlight that appears around selected objects when Opus.selectionPlane is True, otherwise it uses the grid color
Opus.selectColor: red
Opus.highlightColor: red

  • Cancel
Parents
  • CADcasualty
    CADcasualty over 5 years ago

    Also forgot to mention - the actual color I'm seeing when I make a selection rectangle (yellow) isn't any of the colors in the Display Resource Editor after filtering for "hilite" and having selected All Packets or All LPPs

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 5 years ago in reply to CADcasualty

    Rather than messing with with Xdefaults, I'd suggest you do:

    envSetVal("layout" "useDynamicHilightPacket" 'boolean t)

    (actually, this is the default since IC616 ISR5, I think).

    Then you can change the definition of the dynamicHilight packet (note, the packet is called this; there's no layer purpose called this) to change the colour. I just checked and this definitely works. Note, this only works after opening a new window - you can change it for an existing window by using hiGetCurrentWindow()->useDynamicHilightPacket=t .

    For the drag colour, you can create a packet called monoColorDragPacket to change the colour for that. 

    I don't think you need to change the selection colour - I think that is working anyway from what you said? Unless I misunderstood.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • CADcasualty
    CADcasualty over 5 years ago in reply to Andrew Beckett

    Thanks for your super quick response! However, I'm having a little difficultly following/interpreting your instructions - perhaps something was left off your response where you said "Note, this only works after opening a new window - you can". I had played with dynamic highlighting colors before (for schematics) and have always associated that with "halos" around things like nets or labels so it didn't occur to me that they might also have something to do with the color of a selection rectangle.

    As an aside, when I was wildcard searching for "hilite" I didn't expect there'd also be "hilight" and "highlight" in the mix - although I wouldn't have found that family of dynamicHilight packets anyway because wildcard searching is basically my_search_string* and not *my_search_string*. 

    When I found your dynamicHilight packet in the DRE I noticed that the color definition for it was a dotted red outline - that's what currently dynamically appears when I *hover* over something i.e. it already does what I want. I also noticed the packet "dynamicHighlightPre" which is a yellow outline color that appears to correspond to the (unwanted) color of the actual dynamic selection box border when I click and drag to select a region. That's the thing I've been talking about. I tried to change it's color from yellow to red in the DRE but it didn't appear to take (even after opening a new window like you suggested). 

    Regarding creating the packet monoColorDragPacket, I was able to create that with a red color but I have a disconnect as to how Cadence subsequently knows how to use it for the drag color. I tried it out, and it didn't seem to work i.e. my yellow outline selection rectangle was still in force. 

    Finally, this isn't just for layouts - I have the identical selection rectangle issue with schematics. And on the off-chance it matters, I'm viewing these windows on my Mac via NoMachine's NX software. 

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 5 years ago in reply to CADcasualty

    OK, I fixed my incomplete sentence in the previous post; I was half way through writing it when I realised that useDynamicHilightPacket was the default for layout anyway, and I checked that and then forgot to complete the sentence.

    For schematics though, it isn't on by default. There isn't a schematic-specific variable - so instead you'd use:

    envSetVal("graphic" "useDynamicHilightPacket" 'boolean t)

    (again, this affects new windows only. As in my updated post, use hiGetCurrentWindow()->useDynamicHilightPacket=t to update existing windows).

    There's no special meaning for a packet called dynamicHilightPre - interestingly I have one in a case I was playing with, but it's certainly not used anywhere in the code. My guess it was a "previous" version of the dynamicHilight packet, saved just in case!

    The monoColorDragPacket only seems to have an effect on layout. Note, this is not the colour of the selection box when you click and drag to select, but the colour used when you click on some objects and then drag them to move (whether it uses the colour for the source objects as a ghost image, or the dragged objects as a ghost image depends on whether full color drag is enabled, and how many objects there are to be dragged).

    It seems that the Xdefault Opus.dragColor was replaced in IC618 with a cdsenv variable instead:

    envSetVal("ui" "defaultDragColor" 'string "red")

    This is covered in How to control/change the color used to display an object being moved/dragged in the schematic editor? (it affects layout too).

    Does that answer everything? I need to request that defaultDragColor is included in the documentation. It's not right now... (seems to be an oversight).

    Regards,

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • Andrew Beckett
    Andrew Beckett over 5 years ago in reply to CADcasualty

    OK, I fixed my incomplete sentence in the previous post; I was half way through writing it when I realised that useDynamicHilightPacket was the default for layout anyway, and I checked that and then forgot to complete the sentence.

    For schematics though, it isn't on by default. There isn't a schematic-specific variable - so instead you'd use:

    envSetVal("graphic" "useDynamicHilightPacket" 'boolean t)

    (again, this affects new windows only. As in my updated post, use hiGetCurrentWindow()->useDynamicHilightPacket=t to update existing windows).

    There's no special meaning for a packet called dynamicHilightPre - interestingly I have one in a case I was playing with, but it's certainly not used anywhere in the code. My guess it was a "previous" version of the dynamicHilight packet, saved just in case!

    The monoColorDragPacket only seems to have an effect on layout. Note, this is not the colour of the selection box when you click and drag to select, but the colour used when you click on some objects and then drag them to move (whether it uses the colour for the source objects as a ghost image, or the dragged objects as a ghost image depends on whether full color drag is enabled, and how many objects there are to be dragged).

    It seems that the Xdefault Opus.dragColor was replaced in IC618 with a cdsenv variable instead:

    envSetVal("ui" "defaultDragColor" 'string "red")

    This is covered in How to control/change the color used to display an object being moved/dragged in the schematic editor? (it affects layout too).

    Does that answer everything? I need to request that defaultDragColor is included in the documentation. It's not right now... (seems to be an oversight).

    Regards,

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
  • CADcasualty
    CADcasualty over 5 years ago in reply to Andrew Beckett

    Fantastic! You have, once again, saved the day. The depths of your knowledge regarding these tools is simply amazing - relative to the depths of my knowledge i.e. I guess that's just a mild compliment then, possibly even an insult ;-).

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 5 years ago in reply to CADcasualty

    Glad to help! I've requested that the documentation is fixed (it was supposed to have been, but somehow it didn't make it into the production build; either way we need to clean up the Xdefaults guidance anyway).

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel

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