Skip to main content
15-Moonstone
October 2, 2023
Solved

Attribute of type real number

  • October 2, 2023
  • 2 replies
  • 1706 views

Hi community,

 

I want to get the value of an attribute in the code below. The attribute is of type real number, defined by the com.ptc.core.meta.common.FloatingPoint class. When I try to get the value it doesn't give me any results. Can you help me?

 

 

 

 

 com.ptc.core.lwc.server.PersistableAdapter obj = new com.ptc.core.lwc.server.PersistableAdapter(part,null,java.util.Locale.getDefault(),new com.ptc.core.meta.common.UpdateOperationIdentifier());
 obj.load("SURFACE_M2 ");
 SURFACE_M2 = (com.ptc.core.meta.commmon.FloatingPoint) obj.get("SURFACE_M2");

 

 

 

 

 

Best answer by HelesicPetr

Hi @smcvr 

Wrong name definition >D 

obj.load("SURFACE_M2 ");

HelesicPetr_0-1696232192724.png

You added a space in the end. Remove it.

 

PetrH 

2 replies

Fadel
23-Emerald I
October 2, 2023

what is the windchill version ?

Buiꓘa
smcvr15-MoonstoneAuthor
15-Moonstone
October 2, 2023

Hi @Fadel 

 

Use Windchil  12.0.2.9

HelesicPetr
22-Sapphire II
22-Sapphire II
October 2, 2023

Hi @smcvr 

Wrong name definition >D 

obj.load("SURFACE_M2 ");

HelesicPetr_0-1696232192724.png

You added a space in the end. Remove it.

 

PetrH 

smcvr15-MoonstoneAuthor
15-Moonstone
October 2, 2023

Hi @HelesicPetr,

 Thank you so much for your help 😄

HelesicPetr
22-Sapphire II
22-Sapphire II
October 2, 2023

@smcvr Four eyes see more than two 😄

PetrH