CoCreate User Forum  

Go Back   CoCreate User Forum > Applications > CoCreate Modeling

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
  #1  
Old 06-26-2006, 06:17 AM
Steve Steve is offline
Registered User
 
Join Date: Mar 2003
Location: Alabama
Posts: 309
How To: See part numbers and descriptions in Structure Browser

Like many of you, for years I have been frustrated by the format of the Structure Browser.

As you know, by default the Structure Browser lists parts loaded into memory by "Instance Name". The Instance Name is a "pseudo-name" that has virtually no relationship to the actual part, and users can call any given part any name they would like. And if the same part is used in multiple assemblies, it can have a different Instance Name in each assembly where it is used.

Some users might call up part 123 and give it an instance name of "123", while others might call it "123_widget", while another might call it "widget-123", while still another might call it "my_widget". This can get confusing, especially when you open an assembly that someone else created, because you never know what to search for in the Structure Browser.

I am of the opinion that the only thing you can really hang your hat on for any part is it's Part Number. Most people put the Part Number in the Model Name. So it always seemed to make more sense to me to have the Structure Browser list parts by Model Name, not Instance Name. Thanks to a post by Marten ( http://www.cocreateusers.org/forum/showthread.php?t=5856 ), I figured out how to do that.

But - one reason people like the Instance Name is because they could put in a "descriptive" name. Some people don't like having to remember or look up part numbers. Even though I find it harder to locate parts by description than by part number, I agree - it would be great to see descriptions in the Structure Browser, too. But how to get them? How to get a "Description" field? Well, as it turns out, you can reference the Description field from Model Manager.

After a lot of digging and working with CoCreate tech support, I was able to figure out how to make an alternative Structure Browser. The original "Default" browser stays there, so you can still see the tree broken down by Instance Name if you need to, but there is now a second browser available that breaks the tree down by Model Name (part number) and Description, with both fields being driven by the Model Manager database.

To implement this simple customization, do the following:

1) Make a backup copy of the following file: C:\Program Files\CoCreate\OSD_Modeling_2006\personality\sd_customize\ModelManager\mm_customize

2) Edit the above file to look like this:

;; The following customizations create a second structure browser
;; view that displays only the Model Name and Description,
;; as defined in the Model Manager database. SES 06/21/2006

;; Create a db-uda definition for DESCRIPTION
(oli::sd-define-db-attribute "MY_DESC"
:class-name "MODEL_3D"
:attachment :contents
:keys
'(
("DESCRIPTION")
)
:allowed-owner-types :part-assembly
:filing '(:db :sd-file)
:master :all
:on-split :copy
)

;; Add MM-STATE
;; This defines a field ":mm-state" for use in the browser view below.
(oli::sd-create-uda-enum-column-definition
:mm-state
:title "MM Status"
:attribute "DB-GREF"
:value-list-key :MM_STATUS_TEXT
:attachment :contents
:enumerators (mapcar #'(lambda (state) (second state))
modelmanager::*mm-status-messages*)
)

;; ADD VERSION
;; This defines a field ":mm-version" for use in the browser view below.
(oli::sd-create-uda-string-column-definition
:mm-version
:title "Revision"
:attribute "DB-DREF"
:value-list-key :VERSION
:attachment :contents
)

;; create a uda column definition
;; This defines a field "Description" for use in the browser view below.
(oli::sd-create-uda-string-column-definition :description-column
:title "Description"
:attribute "MY_DESC" ;; matches the sd-define-db-attribute name
:value-list-key "DESCRIPTION" ;; the name of the attribute
:attachment :contents
)

;; Create a new view to display the description2 only
(oli:sd-create-browser-view "MY-CUSTOM"
:title "Part Number / Description"
:tree-config '(:contents-name " [" :mm-version "] " :mm-state)
:detail-config '(:description-column :mm-version :mm-state)
:activate-detail-configuration t
:enable '(oli:sd-license-free-module-active-p "ModelManager")
)

Then just re-start Model Manager!

See the attached .jpg image to see how to access this new Structure Browser and what it looks like.

This has probably been the single-most important customization to OSD that I have implemented. Now other users are free to continue to use the Instance Name if they want, and they can put whatever they want in that field and it won't affect me in the slightest, because I'll never see it. Further, the old problem of creating shared parts where each part has a different name (widget.1, widget.1.1, widget.1.1.1, widget.1.1.1.1) now also goes away. All instances of the same part number show up just as you would expect them to - by the same part number.

The bottom line is, every assembly, no matter who made it, now opens the same way - broken down by part number and description, just like a real Bill of Materials.

Since we've already modified Model Manager to break down by Model Name instead of Instance Name, the Instance Name has virtually become irrelevent.

Steve
Attached Thumbnails
Click image for larger version

Name:	structure_browser.JPG
Views:	903
Size:	53.5 KB
ID:	645  
Reply With Quote
  #2  
Old 06-27-2006, 09:43 AM
tim heeney tim heeney is offline
Registered User
 
Join Date: Feb 2003
Location: London,UK
Posts: 17
Thumbs up Re: How To: See part numbers and descriptions in Structure Browser

Steve.
Simply...excellant !

Tim
Reply With Quote
  #3  
Old 05-08-2018, 05:04 AM
Shaba's Avatar
Shaba Shaba is offline
Registered User
 
Join Date: Nov 2006
Location: Italy
Posts: 215
Re: How To: See part numbers and descriptions in Structure Browser

There is a way to make editable from Structure Browser ?
Thanks!!!!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 12:25 PM.



Hosted by SureServer    Forums   Modeling FAQ   Macro Site   Vendor/Contractors   Software Resellers   CoCreate   Gallery   Home   Board Members   Regional User Groups  By-Laws  

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.