Page 1 of 1

Setting Eltype

Posted: Mon Feb 06, 2012 9:57 pm
by pmakulski
I have a process that deletes all of the children of a consolidation.
The consolidation point is still called a consolidation.
I can use an attributes dialog box to change it from Consolidated to Number

but I can't see how to do it in TI.

DTYPE tells me the type
DimensionElementInsert lets me specify NCS for a new item

But I can't see how to change C to N in an existing element.

(In the past I have deleted the element and readded it, but I don't want to do that here because at the higher levels I have ElementSecuity set and I don't want to lose it.)

Re: Setting Eltype

Posted: Mon Feb 06, 2012 10:23 pm
by lotsaram
Sorry to say you can't "change" an element type. DType is a read only property. You can only change an element from N to C and vice versa by deleting and recreating it as you have been doing.

However I believe that if you were to delete and recreate within a single process you shouldn't lose any string data or attributes associated with the element as long as it was recreated with the same principal name.

Re: Setting Eltype

Posted: Mon Feb 06, 2012 10:34 pm
by Alan Kirk
lotsaram wrote:Sorry to say you can't "change" an element type. DType is a read only property. You can only change an element from N to C and vice versa by deleting and recreating it as you have been doing.
Actually you can go that way via using DimensionElementComponentAdd to add a child to an N level element, but unfortunately it's the vice versa way that Paul wants to go. I don't like it personally, but you can do it. See also this thread.

There's no way that I know of (other than delete/re-add) to do what Paul wants, though.

Re: Setting Eltype

Posted: Tue Feb 07, 2012 12:27 am
by lotsaram
Actually you can go that way via using DimensionElementComponentAdd to add a child to an N level element, but unfortunately it's the vice versa way that Paul wants to go. I don't like it personally, but you can do it. See also this thread.

There's no way that I know of (other than delete/re-add) to do what Paul wants, though.
Yes you can add a child to an N element to "convert" it to a C (either manually in the dimension editor or via DimensionElementComponentAdd in TI). I don't like this either, whether it is a bug or a "feature" who knows. But one thing I am pretty sure of is that behind the scenes what is happening is a deletion/creation, and to go from C to N as per the question asked there's certainly no other way.

Re: Setting Eltype

Posted: Tue Feb 07, 2012 1:45 pm
by jim wood
Hhhhhmmm.... I agree that adding a child to an element changes to a C type element. (Kind of makes sense) But when I have done what Paul is doing they do not revert back to N level elements. They simply exist as consolidations without Children. Alan's point is correct.