Cancel
Showing results for 
Search instead for 
Did you mean: 

Re: Populating title block with Material and Weight

Honored Contributor
Honored Contributor

So, without the Teamcenter mapping, the NX_Material attribute won't be created in the ugpart file?  I hope that is the case, because I assigned a material, saved, and do not see it in the properties of my test file.

 

That said, I took a stab at editing our teamcenter mappings, but have not had them imported, does this look correct?  I wanted to provide the option to use the other system attributes too:

{ Dataset type="UGMASTER"
    "DB_PART_NAME" : Item.object_name /write_once /description="Part Name"
    "DB_PART_DESC" : Item.object_desc /write_once /description="Part Description"
    "NX_Material" : ItemRevision.cgr4_Material /master=cad /description="Material"

    { Item type="CGR4_Item"
        "site" : Item.cgr4_Site /description="site"
        "Year" : Item.cgr4_Year /description="Year"
        "SectionComplex" : Item.cgr4_SectionComplex /master=iman /description="cgr4_SectionComplex_toNX"
        "MeasuredWeight" : ItemRevision.cgr4_MeasuredWeight /master=iman /description="Measured Weight"
        "Materialdetail" : ItemRevision.cgr4_Materialdetail /master=iman /description="Material Detail"
        "IPN" : Item.cgr4_IPN /description="Internal Part Number"
        "CarType" : Item.cgr4_CarType /description="Car Type"
    }

}

{ Dataset type="UGPART"
    # (hard-wired) DB_DATASET_ID : "Part File ID"
    # (hard-wired) DB_DATASET_REV : "Part File Rev"
    "DB_DWG_TEMPLATE_NX_Mass" : ItemRevision.GRM(IMAN_specification,UGMASTER).NR(UGPART-MASSPR).mass /master=iman /description="Mass (lbm)"
    "DB_DWG_TEMPLATE_NX_Weight" : ItemRevision.GRM(IMAN_specification,UGMASTER).NR(UGPART-MASSPR).weight /master=iman /description="Weight (lbf)"
    "DB_DWG_TEMPLATE_NX_Area" : ItemRevision.GRM(IMAN_specification,UGMASTER).NR(UGPART-MASSPR).area /master=iman /description="Area (in^2)"
    "DB_DWG_TEMPLATE_NX_Volume" : ItemRevision.GRM(IMAN_specification,UGMASTER).NR(UGPART-MASSPR).volume /master=iman /description="Volume (in^3)"
    "DB_DWG_TEMPLATE_NX_Density" : ItemRevision.GRM(IMAN_specification,UGMASTER).NR(UGPART-MASSPR).density /master=iman /description="Density (lb/in^3)"

}

I suspect the "MASSPR" needs to be WEIGHTPR, etc?

-Dave
NX1867(if it had versions) | Teamcenter 11.6 | Windows 10

Re: Populating title block with Material and Weight

Siemens Esteemed Contributor Siemens Esteemed Contributor
Siemens Esteemed Contributor

Hi @DaveK,

 

It looks good, though I would probably place the material mapping within the custom item type section since you're pointing to the Item Revision of that custom item:

 

{ Item type="CGR4_Item"    
"NX_Material" : ItemRevision.cgr4_Material /master=cad /description="Material"
...
...
}

 

Regarding your UGPART mappings - these will apply to all UGPART item types, if that's your intent.

 

Regards, Ben

Ben Broad | PLM Enthusiast | Siemens GCSS

NX (v17 - 1872) | Teamcenter (9 - 12)
Value Based Licensing | Adaptive UI | BETA Registration

Re: Populating title block with Material and Weight

Honored Contributor
Honored Contributor

So if I move them into the same     { Item type="CGR4_Item" section, that will make them available for all NX part drawings?  that is my only intent, and possibly display them in the summary page in Teamcenter.

-Dave
NX1867(if it had versions) | Teamcenter 11.6 | Windows 10

Re: Populating title block with Material and Weight

Siemens Esteemed Contributor Siemens Esteemed Contributor
Siemens Esteemed Contributor

No, leave the UGPART mappings as they are, as you want them for all NX part drawings. You would only place them within 'Item type="CGR4_Item"' if they were only applicable to that item type.

 

EDIT: I just saw your other question regarding MASSPR.  Leave it as MASSPR - this is the name of the form in the UGMASTER named references.

Regards, Ben

Ben Broad | PLM Enthusiast | Siemens GCSS

NX (v17 - 1872) | Teamcenter (9 - 12)
Value Based Licensing | Adaptive UI | BETA Registration

Highlighted

Re: Populating title block with Material and Weight

Honored Contributor
Honored Contributor

Thanks, so this is what I am going to propose we import:

 

{ Dataset type="UGMASTER"
    "DB_PART_NAME" : Item.object_name /write_once /description="Part Name"
    "DB_PART_DESC" : Item.object_desc /write_once /description="Part Description"


    { Item type="CGR4_Item"
        "site" : Item.cgr4_Site /description="site"
        "Year" : Item.cgr4_Year /description="Year"
        "SectionComplex" : Item.cgr4_SectionComplex /master=iman /description="cgr4_SectionComplex_toNX"
        "MeasuredWeight" : ItemRevision.cgr4_MeasuredWeight /master=iman /description="Measured Weight"
        "Materialdetail" : ItemRevision.cgr4_Materialdetail /master=iman /description="Material Detail"
        "IPN" : Item.cgr4_IPN /description="Internal Part Number"
        "CarType" : Item.cgr4_CarType /description="Car Type"
		"NX_Material" : ItemRevision.cgr4_Material /master=cad /description="Material"
    }

}

{ Dataset type="UGPART"
    # (hard-wired) DB_DATASET_ID : "Part File ID"
    # (hard-wired) DB_DATASET_REV : "Part File Rev"
	"DB_DWG_TEMPLATE_NX_Mass" : ItemRevision.GRM(IMAN_specification,UGMASTER).NR(UGPART-MASSPR).mass /master=iman /description="Mass (lbm)"
	"DB_DWG_TEMPLATE_NX_Weight" : ItemRevision.GRM(IMAN_specification,UGMASTER).NR(UGPART-MASSPR).weight /master=iman /description="Weight (lbf)"
	"DB_DWG_TEMPLATE_NX_Area" : ItemRevision.GRM(IMAN_specification,UGMASTER).NR(UGPART-MASSPR).area /master=iman /description="Area (in^2)"
	"DB_DWG_TEMPLATE_NX_Volume" : ItemRevision.GRM(IMAN_specification,UGMASTER).NR(UGPART-MASSPR).volume /master=iman /description="Volume (in^3)"
	"DB_DWG_TEMPLATE_NX_Density" : ItemRevision.GRM(IMAN_specification,UGMASTER).NR(UGPART-MASSPR).density /master=iman /description="Density (lb/in^3)"

}
-Dave
NX1867(if it had versions) | Teamcenter 11.6 | Windows 10

Re: Populating title block with Material and Weight

Siemens Esteemed Contributor Siemens Esteemed Contributor
Siemens Esteemed Contributor

I can only get the material mapping to work.  I seem to be having problems with mapping to the named references.  @LarryCarpenter, once you've mapped from the NR to the UGPART, how do you reference the attribute?  I'm using Attribute Templates in the drawing template to create the DB_DWG_TEMPLATE_<attr> but the values are empty when I create the drawings.  The values exist in the UGMASTER MASSPR form, but even though the UGPART is reading the mappings, the values are not getting to the UGPART.  Do you have this working in NX11?

Ben Broad | PLM Enthusiast | Siemens GCSS

NX (v17 - 1872) | Teamcenter (9 - 12)
Value Based Licensing | Adaptive UI | BETA Registration

Re: Populating title block with Material and Weight

Siemens Phenom Siemens Phenom
Siemens Phenom

It's been a couple of years since I've got this working.  I use Attribute Template to define Mass. See attached. I also map it using attribute mapping from NX UGMASTER to TC and from TC to the UGPART as shown earlier. I think my NX drawing templates also might have the DWG_TEMPLATE_NX_Mass prefix, but I'm not sure. 

 

My mind is cloudy on this because two years ago I was frantically trying to get this to work after upgrading to NX10 when my users were griping about it being broken.  I used the shotgun approaching trying everything I read until it worked without removing anything I did that might not berelated to it working.


Larry Carpenter, P.E.
CAxPLM Architect @ Siemens Molecular Imaging
Past Board Member @ PLM World, Inc,

Re: Populating title block with Material and Weight

Honored Contributor
Honored Contributor

@BenBroad Might I suggest this become a "How to" article?

 

I have not done anything here, hoping to hear about your results with the weight, and other attribute mapping.

-Dave
NX1867(if it had versions) | Teamcenter 11.6 | Windows 10

Re: Populating title block with Material and Weight

Siemens Esteemed Contributor Siemens Esteemed Contributor
Siemens Esteemed Contributor

Hi @DaveK,

 

While I can get the values from the named reference into the UGPART attributes I'm unable to get the note with the references to the attributes to reflect the values.  I also tried recording a journal to create a note with a reference to the value, which works once - it will not update to changes in the material (and hence mass) in the UGMASTER.  So at this point all I can confirm is that material works, but not of the properties, using this method.  I'm going to run it by our attribute developer.

 

Regards, Ben

 

 

Ben Broad | PLM Enthusiast | Siemens GCSS

NX (v17 - 1872) | Teamcenter (9 - 12)
Value Based Licensing | Adaptive UI | BETA Registration

Re: Populating title block with Material and Weight

Siemens Esteemed Contributor Siemens Esteemed Contributor
Siemens Esteemed Contributor

@DaveK - development asked me to submit a PR.  But they did provide the following:

  • NX_Mass is owned by NX. You should neither create a Template for it nor set the Attribute manually, nor make it iman master.
  • When you map mass to NX, you need to map it to NX_Mass which is the title in NX. NX sets the alias to whatever is in the Customer Defaults.

 

 Sooooo..... if you recall, I was originally setting the mass property in the UGPART-MASSPR form to an attribute defined using Attribute Templates (based on @LarryCarpenter's syntax):

"DB_DWG_TEMPLATE_NX_Mass" : ItemRevision.GRM(IMAN_specification,UGMASTER).NR(UGPART-MASSPR).mass /master=iman /description="Mass (kg)"

 

I created a standard string attribute "CGR_Mass" in my drawing template with a null value and edited my note to point to the new attribute.  I then edited the above mapping as follows:

"CGR_Mass" : ItemRevision.GRM(IMAN_specification,UGMASTER).NR(UGPART-MASSPR).mass /master=iman /description="Mass (kg)"

And now, once my drawing has been saved, the note updates to reflect the mass Smiley Happy

 

Interestingly, once the part is saved the CGR_Mass becomes an alias to NX_Mass (system mass) and its type is now reflected as number.

 

Summary:

1) Create custom Item Type in BMIDE and add a property for material (cgr4_Material).

2) Define the custom item type attribute mappings for UGPART & UGMASTER:

{ Dataset type="UGMASTER"
   { Item type="CGR4_Item"
      "NX_Material" : ItemRevision.cgr4_Material /master=cad /description="Material"
   }
}
{ Dataset type="UGPART"
   {Item type="CGR4_Item"
      "CGR_Mass" : ItemRevision.GRM(IMAN_specification,UGMASTER).NR(UGPART-MASSPR).mass /master=iman /description="Mass (kg)"
   }
}

3) Edit the model and drawing 'nxdm' pax files to point the templates to the custom item type:

 

<ItemType>CGR4_Item</ItemType>

 

4) Edit the drawing templates and add Attribute Template: DB_DWG_TEMPLATE_NX_Material and regular part attribute CGR_Mass.

5) Use "Relationships" in the Note command to "Insert Part Attribute" and create references to DB_DWG_TEMPLATE_NX_Material and CGR_Mass.

 

Regards, Ben

Ben Broad | PLM Enthusiast | Siemens GCSS

NX (v17 - 1872) | Teamcenter (9 - 12)
Value Based Licensing | Adaptive UI | BETA Registration