set hole wizard hole size for given configuration scope

Programming and macros
Kjara
Posts: 21
Joined: Mon Jul 19, 2021 2:49 am
Answers: 0
x 1

set hole wizard hole size for given configuration scope

Unread post by Kjara »

I have a part with more than 1 configuration, and I have a hole wizard hole in that part.

I want to set the hole size for a given configuration scope (this/all/specific), just like one can do with dimensions using IDimension.SetValue3.

So I'm basically looking for a method like IDimension.SetValue3, but which sets the hole size of a hole wizard hole instead. Does such a method exist? And if no such method exists, how else can I achieve this?

What I currently have is this:

1. I take the IWizardHoleFeatureData2 and call AccessSelections.
2. I call IWizardHoleFeatureData2.ChangeStandard to set the new size.
3. I call IWizardHoleFeatureData2.ModifyDefinition and finally IModelDoc.EditAssembly (on root model doc).

It does set the size, but I have no control over the scope using that method. It always uses the current scope, i.e. the one that is selected here:
grafik.png
So is there a method that allows me to set the scope manually before going through the steps above? If there is, that would solve my problem as well.

Any other ideas or hints?
Austin Schukar
Posts: 98
Joined: Thu Mar 18, 2021 11:19 am
Answers: 1
Location: St. Louis, MO
x 288
x 56

Re: set hole wizard hole size for given configuration scope

Unread post by Austin Schukar »

I couldn't find anything on this. Hope someone else can help. Maybe @artem or @Rob?
Austin
User avatar
Rob
Posts: 128
Joined: Mon Mar 08, 2021 3:46 pm
Answers: 2
Location: Mighty Glossop, UK
x 787
x 208
Contact:

Re: set hole wizard hole size for given configuration scope

Unread post by Rob »

Austin Schukar wrote: Tue Dec 07, 2021 12:52 am I couldn't find anything on this. Hope someone else can help. Maybe @artem or @Rob?

Hi Austin

I am sorry I am not too familiar with Hole Wizard in general and Hole Wizard API in particular.

I noticed what you are trying to do seems possible in a Design Table.

If I read your post correctly you could achieve this by cycling through and updating all the configs yourself.

I also guess you could do this by altering the dimensions directly?
..but this would not change the standard, just give you a custom size hole!

Another idea is to create 1 hole wizard feature per standard and suppress them.

Best idea is to see what @artem has to say.

Good Luck
User avatar
mattpeneguy
Posts: 1386
Joined: Tue Mar 09, 2021 11:14 am
Answers: 4
x 2489
x 1899

Re: set hole wizard hole size for given configuration scope

Unread post by mattpeneguy »

Rob wrote: Tue Dec 07, 2021 2:46 am Hi Austin

I am sorry I am not too familiar with Hole Wizard in general and Hole Wizard API in particular.

I noticed what you are trying to do seems possible in a Design Table.

If I read your post correctly you could achieve this by cycling through and updating all the configs yourself.

I also guess you could do this by altering the dimensions directly?
..but this would not change the standard, just give you a custom size hole!

Another idea is to create 1 hole wizard feature per standard and suppress them.

Best idea is to see what @artem has to say.

Good Luck
There's also @josh and @gupta9665 who may be able to help.
Austin Schukar
Posts: 98
Joined: Thu Mar 18, 2021 11:19 am
Answers: 1
Location: St. Louis, MO
x 288
x 56

Re: set hole wizard hole size for given configuration scope

Unread post by Austin Schukar »

Rob wrote: Tue Dec 07, 2021 2:46 am Hi Austin

I am sorry I am not too familiar with Hole Wizard in general and Hole Wizard API in particular.

I noticed what you are trying to do seems possible in a Design Table.

If I read your post correctly you could achieve this by cycling through and updating all the configs yourself.

I also guess you could do this by altering the dimensions directly?
..but this would not change the standard, just give you a custom size hole!

Another idea is to create 1 hole wizard feature per standard and suppress them.

Best idea is to see what @artem has to say.

Good Luck
Thanks @Rob for replying! No biggie. I appreciate the input
mattpeneguy wrote: Tue Dec 07, 2021 8:47 am There's also @josh and @gupta9665 who may be able to help.
Didn't know @josh was here as well. Of course, I should've originally mentioned @gupta9665, naturally!
Austin
User avatar
mattpeneguy
Posts: 1386
Joined: Tue Mar 09, 2021 11:14 am
Answers: 4
x 2489
x 1899

Re: set hole wizard hole size for given configuration scope

Unread post by mattpeneguy »

Austin Schukar wrote: Tue Dec 07, 2021 9:43 am Thanks @Rob for replying! No biggie. I appreciate the input



Didn't know @josh was here as well. Of course, I should've originally mentioned @gupta9665, naturally!
Yes, he has an account here. But, I think he doesn't participate as much here as he did in the old forum.
Austin Schukar
Posts: 98
Joined: Thu Mar 18, 2021 11:19 am
Answers: 1
Location: St. Louis, MO
x 288
x 56

Re: set hole wizard hole size for given configuration scope

Unread post by Austin Schukar »

By the way, @Rob, not to get off-topic, but I checked out the website on your profile. All of the work on there is beyond wonderful. I haven't managed to pick my jaw up from the floor since I opened it.
Austin
User avatar
Rob
Posts: 128
Joined: Mon Mar 08, 2021 3:46 pm
Answers: 2
Location: Mighty Glossop, UK
x 787
x 208
Contact:

Re: set hole wizard hole size for given configuration scope

Unread post by Rob »

Austin Schukar wrote: Tue Dec 07, 2021 11:20 am By the way, @Rob, not to get off-topic, but I checked out the website on your profile. All of the work on there is beyond wonderful. I haven't managed to pick my jaw up from the floor since I opened it.
Thanks @Austin - it makes me feel very tired when I look on there.
User avatar
josh
Posts: 304
Joined: Thu Mar 11, 2021 1:05 pm
Answers: 16
x 22
x 514

Re: set hole wizard hole size for given configuration scope

Unread post by josh »

I don't see anything in the API help about specifying configs when modifying these feature parameters - either the hole wizard or the weldment angle. I've never tried to do that myself in the past, but I'd say if your code works for "This configuration" you're probably going to have to actually switch to every config you want to change and run the same code.
acmall
Posts: 26
Joined: Wed Mar 17, 2021 7:54 am
Answers: 0
x 30

Re: set hole wizard hole size for given configuration scope

Unread post by acmall »

Did anyone ever find a solution for this?
I have the same problem, I need to change the data for specific configuration but have not been able to find a way to do it.
Post Reply