cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

We are happy to announce the new Windchill Customization board! Learn more.

Help with Moving IBA from WTDocument to a Soft Type

BenPerry
13-Aquamarine

Help with Moving IBA from WTDocument to a Soft Type

I am looking to move the definition of IBAs from the top level Type, to a subtype. Does anyone have experience? I am getting lost in the details provided in CS7287.

I will provide a simplified case:

In Type/Attribute Manager, you will find:

wt.doc.WTDocument

com.ptc.Agenda

com.ptc.Analysis

com.ptc.Bill_of_Material

...etc...

In my case, there is an IBA defined on wt.doc.WTDocument called myIBA. Of course this propagates down, so Agenda docs, Analysis docs, Bill of Material docs, etc, all have this IBA.

It was a bad idea to put myIBA on the top level wt.doc.WTDocument because only the com.ptc.Analysis has values populated into myIBA, for example. In all other soft types, the IBA is not applicable. That is why I wish to remove it from wt.doc.WTDocument, and instead put it on com.ptc.Analysis.

How can I move myIBA from wt.doc.WTDocument to com.ptc.Analysis so that it doesn't even show up on all of the other types?

1 ACCEPTED SOLUTION

Accepted Solutions
BenPerry
13-Aquamarine
(To:mrane)

In the end, I used the TypeAttributeMoveTool utility, which is highly documented in the WHC and a few tech support articles. I wasn't exactly clear how to implment the tool in my situation, but I stumbled through it. This was my procedure:

OLD STATE:

wt.doc.WTDocument (defined IBA such as MATERIAL)

com.ptc.Agenda (MATERIAL is inherited, but doesn't apply to Agenda, of course)

com.ptc.Analysis (MATERIAL is inherited, but doesn't apply to Agenda, of course)

com.ptc.Bill_of_Material (MATERIAL is inherited, but doesn't apply to Agenda, of course)

...

com.ptc.Drawing (MATERIAL is inherited)

...

TEMPORARY STATE:

wt.doc.WTDocument (defined IBA such as MATERIAL)

com.ptc.Agenda (MATERIAL is inherited, but doesn't apply to Agenda, of course)

com.ptc.Analysis (MATERIAL is inherited, but doesn't apply to Agenda, of course)

com.ptc.Bill_of_Material (MATERIAL is inherited, but doesn't apply to Agenda, of course)

...

com.ptc.Drawing (MATERIAL is inherited, and Drawing_MATERIAL is a new IBA defined at this level)

...

Now the IBA exists on the com.ptc.Drawing twice - both as MATERIAL and as Drawing_MATERIAL. The MATERIAL IBA contains a value. However, the Drawing_MATERIAL IBA does not contain a value yet.

Execute the command:

windchill com.ptc.core.lwc.server.TypeAttributeMoveTool <typeName> <sourceAttributeName> <targetAttributeName> -u <userID> -p <password>

Such as:

windchill com.ptc.core.lwc.server.TypeAttributeMoveTool com.ptc.Drawing MATERIAL Drawing_MATERIAL -u wcadmin -p <password>

Now the Drawing_MATERIAL IBA contains the same value that MATERIAL contained. Therefore, we can safely delete the MATERIAL IBA from the top level wt.doc.WTDocument (after first removing them from the layouts).

FINAL STATE:

wt.doc.WTDocument

com.ptc.Agenda

com.ptc.Analysis

com.ptc.Bill_of_Material

...

com.ptc.Drawing (defined IBA: Drawing_MATERIAL)

...

and now my Agenda's, Analysis', and Bill of Materials' don't have the MATERIAL IBA on them anymore. And the Drawing_MATERIAL IBA contains the values that the old MATERIAL IBA contained, so no data has been lost.

View solution in original post

2 REPLIES 2
mrane
1-Newbie
(To:BenPerry)

Hi Ben,

I might not have an answer to movement of attributes. I was wondering if there could be a workaround of sorts. Following is what I could think of.

1. For objects where having the attribute does not make sense, one can remove the attributes from the relevant layouts.

2. One can adjust the attribute visibility as well from the attribute details panel on the Type and Attribtue Manager.

On second thoughts, I found case CS64539. This talks about TypeAttributeMoveTool Utility. I think this should help your need.

-Malavika

BenPerry
13-Aquamarine
(To:mrane)

In the end, I used the TypeAttributeMoveTool utility, which is highly documented in the WHC and a few tech support articles. I wasn't exactly clear how to implment the tool in my situation, but I stumbled through it. This was my procedure:

OLD STATE:

wt.doc.WTDocument (defined IBA such as MATERIAL)

com.ptc.Agenda (MATERIAL is inherited, but doesn't apply to Agenda, of course)

com.ptc.Analysis (MATERIAL is inherited, but doesn't apply to Agenda, of course)

com.ptc.Bill_of_Material (MATERIAL is inherited, but doesn't apply to Agenda, of course)

...

com.ptc.Drawing (MATERIAL is inherited)

...

TEMPORARY STATE:

wt.doc.WTDocument (defined IBA such as MATERIAL)

com.ptc.Agenda (MATERIAL is inherited, but doesn't apply to Agenda, of course)

com.ptc.Analysis (MATERIAL is inherited, but doesn't apply to Agenda, of course)

com.ptc.Bill_of_Material (MATERIAL is inherited, but doesn't apply to Agenda, of course)

...

com.ptc.Drawing (MATERIAL is inherited, and Drawing_MATERIAL is a new IBA defined at this level)

...

Now the IBA exists on the com.ptc.Drawing twice - both as MATERIAL and as Drawing_MATERIAL. The MATERIAL IBA contains a value. However, the Drawing_MATERIAL IBA does not contain a value yet.

Execute the command:

windchill com.ptc.core.lwc.server.TypeAttributeMoveTool <typeName> <sourceAttributeName> <targetAttributeName> -u <userID> -p <password>

Such as:

windchill com.ptc.core.lwc.server.TypeAttributeMoveTool com.ptc.Drawing MATERIAL Drawing_MATERIAL -u wcadmin -p <password>

Now the Drawing_MATERIAL IBA contains the same value that MATERIAL contained. Therefore, we can safely delete the MATERIAL IBA from the top level wt.doc.WTDocument (after first removing them from the layouts).

FINAL STATE:

wt.doc.WTDocument

com.ptc.Agenda

com.ptc.Analysis

com.ptc.Bill_of_Material

...

com.ptc.Drawing (defined IBA: Drawing_MATERIAL)

...

and now my Agenda's, Analysis', and Bill of Materials' don't have the MATERIAL IBA on them anymore. And the Drawing_MATERIAL IBA contains the values that the old MATERIAL IBA contained, so no data has been lost.

Top Tags