Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Unspecified error when setting BSP threads

9 REPLIES 9
SOLVED
Reply
Message 1 of 10
sdlF9MME
329 Views, 9 Replies

Unspecified error when setting BSP threads

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?

9 REPLIES 9
Message 2 of 10
Frederick_Law
in reply to: sdlF9MME

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

Message 3 of 10
sdlF9MME
in reply to: Frederick_Law

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.

Message 4 of 10
A.Acheson
in reply to: sdlF9MME

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
Message 5 of 10
sdlF9MME
in reply to: A.Acheson

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. 

Message 6 of 10
A.Acheson
in reply to: sdlF9MME

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
Message 7 of 10
sdlF9MME
in reply to: A.Acheson

It indeed works. This is really counterintuitive. Why put classes in the excel sheet if it breaks the function?
Message 8 of 10
Frederick_Law
in reply to: sdlF9MME

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

Class B is empty.

Maybe that's why.

Message 9 of 10
A.Acheson
in reply to: Frederick_Law

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
Message 10 of 10
nagihan.bostan
in reply to: A.Acheson

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");

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Technology Administrators


Autodesk Design & Make Report