Unspecified error when setting BSP threads

Unspecified error when setting BSP threads

sdlF9MME
Participant Participant
690 Views
9 Replies
Message 1 of 10

Unspecified error when setting BSP threads

sdlF9MME
Participant
Participant

Hi. 

Im writing a program that changes the type and dimensions of threads for hydraulic ports. Using the an API method (The set.thread function in ilogic is not working properly so this is a workaround). Here is the code.

Capture d’écran 2023-05-29 153116.png

AINSI threads work normally, but BSP pipe threads results in this error code:

Capture d’écran 2023-05-29 153315.pngCapture d’écran 2023-05-29 153240.png

Which doesn't tell me much about the problem.  Am I writing something wrong?

0 Likes
Accepted solutions (1)
691 Views
9 Replies
Replies (9)
Message 2 of 10

Frederick_Law
Mentor
Mentor

Does Hole1 has correct hole diameter for G 1/2-14?

0 Likes
Message 3 of 10

sdlF9MME
Participant
Participant

Shoudn't matter in this case no? The function should automatically make a hole of the appropriate diameter? I used this function to change from ANSI unified to NPT for multiple sizes and it never had any problems. I tried experimenting with it but without success.

0 Likes
Message 4 of 10

A.Acheson
Mentor
Mentor

The error messages just states one of your variable strings is incorrect. Either look at the dialogue box of the manually selected thread or look to the thread excelsheet to find the correct variable strings to input. I haven't looked at the excel sheet but should there be a G in the Size Designation? 

 

Sample location for thread excel sheet.

C:\Users\Public\Documents\Autodesk\Inventor 202x\Design Data\XLS\en-US\Thread.xls 

If this solved a problem, please click (accept) as solution.‌‌‌‌
Or if this helped you, please, click (like)‌‌
Regards
Alan
0 Likes
Message 5 of 10

sdlF9MME
Participant
Participant

Thre is indeed a G in the thread designation. Here is the relevant page:

Capture d’écran 2023-05-30 080612.png

The thread designation seems to be correctly written. I also copied and pasted the name of the threads, resulting in the same error. 

0 Likes
Message 6 of 10

A.Acheson
Mentor
Mentor
Accepted solution

Looking at the dialogue box the class string is empty despite there being one in the thread sheet. 

AAcheson_0-1685450927506.png

This works when the class string is left empty.

Dim tapInfo As HoleTapInfo = def.Features.HoleFeatures.CreateTapInfo(True, "BSP Pipe Threads", " G 1/2-14","",True,)

 

If this solved a problem, please click (accept) as solution.‌‌‌‌
Or if this helped you, please, click (like)‌‌
Regards
Alan
0 Likes
Message 7 of 10

sdlF9MME
Participant
Participant
It indeed works. This is really counterintuitive. Why put classes in the excel sheet if it breaks the function?
0 Likes
Message 8 of 10

Frederick_Law
Mentor
Mentor

According to the table, internal thread don't have class.

Class B is empty.

Maybe that's why.

Message 9 of 10

A.Acheson
Mentor
Mentor

Hi @Frederick_Law 

Your on the money, I didn't really spot that when looking at the table. Every day is a school day. 

If this solved a problem, please click (accept) as solution.‌‌‌‌
Or if this helped you, please, click (like)‌‌
Regards
Alan
0 Likes
Message 10 of 10

nagihan.bostan
Enthusiast
Enthusiast

Hi,

Similarly;
I set the thread type to "ISO Pipe Threads". But I'm getting  error.
Any idea?

 

nagihanbostan_0-1695649067256.png

 

//ISO Pipe Threads:
var holeTapInfo = oPartComponentDefination.Features.HoleFeatures.CreateTapInfo(true, "ISO Pipe Threads", " G 1/2", "", true, "20 mm");