Skip to main content
17-Peridot
October 23, 2023
Solved

Autoassociate CAD to WTPart soft type

  • October 23, 2023
  • 2 replies
  • 2140 views

There was a thread on this from ~10 years ago (here) and I'm sure things have changed for the better since then. 

 

Is there a way to autoassociate CAD to a soft type of a WTPart in certain contexts? 

I have 2 subtypes of WTParts and one is set as the default on CAD associations. 

In one context, I want the other one to be the only WTPart type going in. I tried adjusting the preference for that context (Operations/General/Custom Modeled Part Class and added my WTPart internal name there) and I tried adjusting the OIR to enable only the subtype I want AND in the OIRs calling out wt.part.WTPart|my custom part internal name. Still, it auto-associates to the default. 

 

 

Best answer by HelesicPetr

Hi @Dobi 

 

You need to define 2 CAD SubTypes where you define different WTpart type in type and attribute management.

Then you can set model parameter to define what CAD Document subtype should be used for that model and then the auto-generation uses WTPart subtypetype defined in the type and attribute management 

 

CS41665 - How to create subtypes CAD Document

HelesicPetr_0-1698133888663.png

 

So your start models just need to contain that parameter with correct value.

 

PetrH 

2 replies

HelesicPetr
22-Sapphire II
22-Sapphire II
October 24, 2023

Hi @Dobi 

 

You need to define 2 CAD SubTypes where you define different WTpart type in type and attribute management.

Then you can set model parameter to define what CAD Document subtype should be used for that model and then the auto-generation uses WTPart subtypetype defined in the type and attribute management 

 

CS41665 - How to create subtypes CAD Document

HelesicPetr_0-1698133888663.png

 

So your start models just need to contain that parameter with correct value.

 

PetrH 

Dobi17-PeridotAuthor
17-Peridot
October 24, 2023

Hi @HelesicPetr and thanks for that! 

 

So there isn't a way to do this association without having a CAD subtype, I take it? 

I'll give this a try. 

HelesicPetr
22-Sapphire II
22-Sapphire II
October 25, 2023

Hi @Dobi 

Yes there is a way with customization. I showed you how to achieve your needs by OOTB functions.

 

With customization you can do whatever you want. You just need to know what is condition so set correct subtype.

 

For example @RandyJones has mentioned one option with custom class that is configured in preference management for autoassociation. 

 

PetrH

20-Turquoise
October 24, 2023

We do this very thing here where different contexts need different WTPart subtype associated. We are doing this as follows:

  • Created a custom string attribute "Default Part Type" for
    • Product
    • Project
    • Library
  • Using a customized AutoAssociate that finds the container and gets the value of Default Part Type to set the wtpart type.
Dobi17-PeridotAuthor
17-Peridot
October 24, 2023

Did you do this with CAD subtypes or just with the string attribute?

20-Turquoise
October 24, 2023

@Dobi wrote:

Did you do this with CAD subtypes or just with the string attribute?


With my method you do not need CAD Subtypes - we do not use them. The string attribute is defined on the containers (Product, Project, and Library) using Type and Attribute Manager.