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

D222 = LENGTH_1:FID_C_START


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.



Comments

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..

Controlling LED through Octolapse for 3D print timelapse

Today's post is about one of the 3D Printing adaptation that I learned. This is specifically about how to control an LED light automatically through OctoLapse so that it is switched on only when the timelapse photo is taken. Just as a background, I have been learning to use 3D printer and its customizations options for a few months now and was a lot of learning since then. The best thing was OctoPi, a platform for controlling the 3D printer and the many plugin options that are developed by the community.  Most of them are like open source. Today we will discuss specifically about an adaptation to one such plugin, OctoLapse. OctoLapse is the plugin for taking timelapse photos, with many options for further customisations. One of the best timelapse method is taking photo after each layer is complete, by moving the head out of the way. You can use standard Pi Camera or a DSLR, which is great to get good resolution videos. One small flash back before we dive into the topic.  I keep the

PTC Creo | my Mapkeys for free

I have created a list of frequently used mapkey shortcuts for the PTC Pro Engineer Creo. This is the macro equivalent in creo.  I am copying them below.If you need them, copy paste the content to the "config.pro" file in your startup folder. My favourites are highlited and greatly improves the workflow.. For ex, to reach MEASURE. need to go to another menu and click.  Instead, maypkey from any selected menu on the ribbon will work.. Thats wonderful to me... Also, Edit Sketch (ES) is overloaded and will work for Extrusion, Revelution, Sweep etc.. So is aa, pp, zz..  really helps me a lot.. Hope you will start using them as well and get benefited! Let me know in comments, your feedback and issues.... Sketch View           > sv Show and Erase        > se Working Directory     > wd Hiddel Line View      > hi Close (quit) Window   > qw Measure               > mm Erase Session         > ee Insert Mode @ Sel     > is Cancel Insert Mode    > ic edit Sketch