Skip to main content
Best answer by HelesicPetr

Hi @HO_10736653 

In your case there can be many cases. Something is wrong in definition. It could be good to know a background and any code you use. 

 

For example you are traying to change an Object type to something that is not possible.

Here is an example with explanation

The point is that you can not change a type from WTDocument to WTPart

You can change a type from WTDocument to subtype of WTDocument. 

in your case you need to know what type is your Object.

 

From the error I can see that You try to retype Object to something that is not possible.

 

another example.

Cat and Dog are Pets. But you can not change a type Pet to a Dog if the type was Cat (originally crated as a Cat) ...

 

PetrH

1 reply

HelesicPetr
22-Sapphire II
22-Sapphire II
November 29, 2023

Hi @HO_10736653 

What API are you looking for?

If you create WTPart or WTDoc set the type with setTypeDefinitionReference method before first save

example

 

TypeDefinitionReference tdr = TypedUtility.getTypeDefinitionReference("cz.aveng.MYDOCTYPE");
try
{
	doc.setTypeDefinitionReference(tdr);
} catch (WTPropertyVetoException e)
{
	e.printStackTrace();
}

 

PetrH

Fadel
23-Emerald I
November 29, 2023

@HelesicPetr I think he's looking for the packages to import in the old thread  .

Buiꓘa
HelesicPetr
22-Sapphire II
22-Sapphire II
November 29, 2023

@Fadel 

The original thread was talking about the changing the type. 

PetrH