Showing results for 
Search instead for 
Did you mean: 

Make threaded hole

Siemens Creator Siemens Creator
Siemens Creator

Hi all,


I'm write nxopen application in c++.


There is a way to make hole 'threaded hole' using nxopen API?


The problem is that if i'm recording journal the API of making threaded hole not exposed!



Re: Make threaded hole


Creating a threaded hole is achieved with


NXOpen::Features::HolePackage *nullNXOpen_Features_HolePackage(NULL);
    NXOpen::Features::HolePackageBuilder *holePackageBuilder1;
    holePackageBuilder1 = workPart->Features()->CreateHolePackageBuilder(nullNXOpen_Features_HolePackage);


I you create a journal when you create a threaded hole the journal sets the defaults for

General Hole

Drill Size Hole

Screw Clearance Hole

Threaded Hole

Hole Series


So the basic journal consists of about 470 lines of code but what you require for threaded hole is included.


Frank Swinkels 

Re: Make threaded hole

Siemens Creator Siemens Creator
Siemens Creator

Hi FrankSwinks,


Your answer is good in case i want to create a new hole and define the hole to be threaded hole,


but my problem is that i want to define existing hole (feature) to be a threaded hole.


maybe you can help me with that issue?



*I added a screenshot of what i want to do when i record it......the 'Threaded hole' option not marked in green so i cant see the code behind this method

Re: Make threaded hole

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

I suggest using the "threaded hole" type option in the hole command rather than adding the thread later with the thread command when possible. The "threaded hole" is better supported by the API.

Re: Make threaded hole


OK if you want to add a symbolic thread to an existing hole then the best I can do is show you the code I use in VB for the modeling wrapper function.


Dim threaddata As UFModl.SymbThreadData = Nothing
        threaddata.cyl_face = threadfacetag
        threaddata.start_face = startfacetag
        threaddata.axis_direction = threaddirection
        threaddata.form = threadstandard
        threaddata.callout = threadcallout
        threaddata.method = "CUT"
        threaddata.angle = "60"
        threaddata.include_instances = UFConstants.UF_MODL_NO_INSTANCES
        threaddata.rotation = UFConstants.UF_MODL_RIGHT_HAND
        threaddata.length_flag = UFConstants.UF_MODL_FIXED_LENGTH
        threaddata.length = threaddepthstring
        threaddata.tapered = UFConstants.UF_MODL_NON_TAPERED
        threaddata.num_starts = 1
        threaddata.tapped_dia = tapdiastring
        ufs.Modl.CreateSymbThread(threaddata, threadtag)


Hope this helps.


Frank Swinkels

Re: Make threaded hole

Siemens Legend Siemens Legend
Siemens Legend

Hello Emil,


As you can see in your picture the Thread command does not have a green dot, that marks it as being recordable by a journal.

Therefore it will not be recorded.

However, it can stil be programmed with the method Frank Swinkels is showing you.



Gerrit Koelewijn

Re: Make threaded hole


Just one further thought.  If the existing hole is a hole feature then it is possible to edit the existing hole feature and convert it to a threaded hole using programming.


Frank Swinkels

Re: Make threaded hole

Siemens Creator Siemens Creator
Siemens Creator

Hi guys,


Thank you for hellping Smiley Happy


After a litle research and your's help this are the API'S for converting regular hole to threaded hole are - 



Thread creation API:



Thread edit API:



Also there existing example in NX install directory ------>


(very good example)