Cancel
Showing results for 
Search instead for 
Did you mean: 

How can I edit UDO

Creator
Creator

Hi,

 

I have create an UDO , but i am not able to edit it even though i register the edit callback to my UDO class.  

I tried menu->insert->edit user define object , but still i am not able to do edit.  

please seggest me on this.  

 

Thanks

7 REPLIES 7

Re: How can I edit UDO

Siemens Phenom Siemens Phenom
Siemens Phenom

Build and run the UDO example found under ...ugopen\SampleNXOpenApplications\.NET\UDO.

 

After you have placed the UDO, MB3 on it and Edit User Defined Object.  Select a new location.  See it move.

 

Compare your code to the example to see what might be different.

Re: How can I edit UDO

Creator
Creator
Thanks Steve...

I can select UDO if it is display in session but if I don't want to display and I want to select object by class name to edit in dialog at that time object not select by name.

Thanks

Re: How can I edit UDO

Siemens Phenom Siemens Phenom
Siemens Phenom

Did you use UF_UDOBJ_set_query_class_id() to allow selection by class id name?  That is the Open C call - I can't remember off the top of my head what it is in the new-style NX Open kit.

Re: How can I edit UDO

Creator
Creator
Yes i tried but still it is not selecting object interactively when i used select by class name option in dialog.(menu->edit->edit user define object).

I have used below things to select object by class name:
myUDOclass->SetAllowQueryClassFromName(UserDefinedClass::AllowQueryClassOn)
myUDOclass->AllowQueryClassFromName()

If i used below code

UF_UDOBJ_class_t class_id;
UF_UDOBJ_ask_class_id_of_name("Sample_Cpp_UDO", &class_id);
UF_UDOBJ_set_query_class_id(class_id, UF_UDOBJ_ALLOW_QUERY_CLASS_ID);

getting class_id 0.

Thanks

Re: How can I edit UDO

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

Perhaps you're not selecting exactly what you think you are selecting?

I would suggest writing a bit of "test" code, and UF_OBJ_ask_type_and_subtype (or wrapped version thereof) .

 

1) Select object interactively - what is type/subtype?

2) Select object programatically - what is type/subtype?

 

Are they the same types/subtypes?

 

Use %UGII_BASE_DIR%\UGOPEN\uf_object_types.h to decipher the integer values

Ken Akerboom Sr CAx Systems Engr, Moog, Inc.
Production: NX10.0.3.5 MP16/TC11.2
I'd rather be e-steamed than e-diseaseled


Re: How can I edit UDO

Creator
Creator

Thanks it works now.....

I have one more query .
How can i integrate this UDO Callbacks and piece of code which is creating UDO to my NXOpen application.

Because when i try to edit UDO it will not invoke "myEditCB" method in my application.

 

And if the application containns only UDO code (like SImple UDO example  which is given in UGOpen)it works fine.

Re: How can I edit UDO

Creator
Creator

Hey Monika, 

I am facing the same problem that you seem to have solved, I Registered a UDO and now i want to access and edit it programmatically, but UserDefinedClassManager.GetUserDefinedClassFromClassName() comes back with an error. How did you manage to Fix it?

 

Best Regards

Franz