home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / sys / mentor / 329 < prev    next >
Encoding:
Text File  |  1993-01-11  |  3.7 KB  |  94 lines

  1. Newsgroups: comp.sys.mentor
  2. Path: sparky!uunet!gatech!rpi!zaphod.mps.ohio-state.edu!sdd.hp.com!hpscit.sc.hp.com!news.dtc.hp.com!srgenprp!john
  3. From: john@sad.hp.com (John Ruf)
  4. Subject: Re: Unused Symbol Pins in Design Architect
  5. Sender: news@srgenprp.sr.hp.com (placeholder for future)
  6. Message-ID: <C0pAur.13x@srgenprp.sr.hp.com>
  7. Date: Mon, 11 Jan 1993 17:49:38 GMT
  8. References: <4253@eastman.UUCP>
  9. Organization: HP Sonoma County (SRSD/MWTD/MID)
  10. X-Newsreader: TIN [version 1.1.4 PL6]
  11. Lines: 81
  12.  
  13. Jeff Szczepanski (szczepan@dtc.kodak.com) wrote:
  14. : Has anybody found a way to create a component in Design Architect that can be
  15. : used to connect to unused pins on other symbols. This would be done to prevent
  16. : pins that I don't want connected to anything from being flagged as 
  17. : "Instance has unconnected pins...." warnings in "Check Sheet".
  18. : I am aware of the CLASS=dangle property for pins, but this is too much of a hassle
  19. : and too error prone, besides being graphically unfriendly.
  20. : Any help or suggestions would be greatly appreciated. 
  21. : Thanks,
  22. : Jeff
  23.  
  24.   Here is a way to do it that takes the hassle out of it (for the users at
  25. least). You will need to learn a little bit about AMPLE and loading userware
  26. to get this to work, and you may also want to create a simple way to access
  27. this command (register it and give it a short command alias, put it on the
  28. palette menu with an icon, create a stroke, etc.). We have this accessed by
  29. a palette icon here.
  30.   This function should be placed in a file called "schematic.ample" and should
  31. be found by the AMPLE_PATH env variable (See the AMPLE users manual for more
  32. details or call your Mentor support).
  33.  
  34. ------------------------------------------------------------------------------
  35.  
  36. function add_ncnet()
  37.     // This function lets you terminate pins that you want to leave
  38.     // unconnected on a schematic. The function lets you add a net to the
  39.     // desired pin, then attaches a CLASS - DANGLE property to tell Mentor
  40.     // that you mean to leave it unconnected. It then attaches a net name
  41.     // (PCB_NET) of NC for visual documentation of the Not Connected net.
  42.     // The properties are placed and justified nicely based on the
  43.     // direction of the last segment of the net you added.
  44. {
  45.   local netnameposX;
  46.   local netnameposY;
  47.   local hjust;
  48.  
  49.   while (@true) {        // loop infinite
  50.     $unselect_all(@comment,@frame,@instance,@pin,@property,@symbolpin,@text,@vertex);
  51.     $add_net();
  52.     $freeze_window();        // makes it faster
  53.     // Find last segment of the added net and determine position and
  54.     // justification of the properties.
  55.     local handles = $get_select_handles();
  56.     local numpts = length(handles);
  57.     local lastpt = $get_vertex_attributes(handles[numpts-1],@location)[0];
  58.     local prevpt = $get_vertex_attributes(handles[numpts-2],@location)[0];
  59.     if (lastpt[0] > prevpt[0]) {
  60.       netnameposX = lastpt[0] + .05;
  61.       netnameposY = lastpt[1];
  62.       hjust = @left;
  63.     }
  64.     else if (lastpt[0] < prevpt[0]) {
  65.       netnameposX = lastpt[0] - .05;
  66.       netnameposY = lastpt[1];
  67.       hjust = @right;
  68.     }
  69.     else if (lastpt[1] > prevpt[1]) {
  70.       netnameposX = lastpt[0];
  71.       netnameposY = lastpt[1] + .1;
  72.       hjust = @center;
  73.     }
  74.     else {
  75.       netnameposX = lastpt[0];
  76.       netnameposY = lastpt[1] - .1;
  77.       hjust = @center;
  78.     }
  79.     $unselect_all(@comment,@frame,@instance,@pin,@property,@symbolpin,@text,@vertex);
  80.     // Add the properties to the net
  81.     $select_by_handle(@noview,handles[numpts-1]);
  82.     $add_property("PCB_NET","NC",[netnameposX,netnameposY]);
  83.     $add_property("CLASS","DANGLE",[netnameposX,netnameposY]);
  84.     $change_property_justification("PCB_NET",@center,hjust);
  85.     $change_property_justification("CLASS",@center,hjust);
  86.     $change_property_visibility("CLASS",@hidden);
  87.     $unfreeze_window(@force);
  88.   }
  89. }
  90.