Skip to main content

Special Notes on UDF

Recently I had lots of problems with UDF Creation. I thought I will some those over here..

1) Create a Coordinate System (C_SYS) and all the features coming to the UDF should be a child or a sub-child of that C_SYS. This way its easy to place the UDF.

This is one of the critical things you have to consider for a successful UDF.

2) I had to make the teeth completely parameteric. But I had lots of issues when I used Part Level parameters (Normal Parameters). Instead, create all the parameters (and relations) that are needed for the UDF in the base C_SYS. This way the parameters will get created easily in the new part when the UDF is placed.

3) Using Feature Parameters has another advantage. You can have multiple UDF placed in new part and those UDFs can be different. If you manage to have part level parameters driving the UDF, then both instances of the UDF will be driven by the same set of parameters and hence the UDFs will be identical.

4) If you have to access the Feature Parameters, there is small difference. Let me take an example.

Say if LENGTH_1 is a Part Parameter, then to use the parameter to drive a dimension you have to write..

D179 = LENGTH_1

but if you have created LENGTH_1 in a featuer C_START and you need to use it in another feature, then you need to write


5) NOTE: Do NOT use "Solve-For" in relation that are part of the UDF. I could not get any real clarification on this. But I have seen that by putting this, the UDF fails. In fact, to figure out that this was the problem, I lost days because I didnt expect this as a potential culprit.


Popular posts from this blog

TreeView Structure in Excel VBA

TreeView is extreamly useful in specific cases but it can be bit tricky sometimes to implement.  Last Few days I was working on a TreeView Structure and thought I will share the knowledge I gained...  This post takes you through the basic operations to create and operate a TreeView. It will be like the Folder tree window of the windows explorer.  Moreover, you can have it dynamically updated based on the data in excel.... Here we go..

Excel Function :TABLE

Its been a while since I have done some posting. This option in excel is something which I thought would be very useful for many. Its the TABLE Function in MS Excel. This is especially useful in the following scenarios.