Skip to main content
4-Participant
Question

ProXsecCompXhatchStyleSet&Hatch

I'm a student and I have a question. Could you please explain how to use the method "ProXsecCompXhatchStyleSet"? I want to change the pattern of the section lines in the perspective view, but I'm not sure how to use this API or how to use other related APIs. Can someone help me?

5 replies

24-Ruby IV
Emeritus

Hello @ML_14468763,

 

It looks like you have a response from a community expert. If it helped you solve your question please mark the reply as the Accepted Solution. 
Of course, if you have more to share on your issue, please let the Community know so other community members can continue to help you.

Thanks,
Vivek N.
Community Moderation Team.

Translate
5-Regular Member
ProXsec p_xsec; 
ProError status;
ProColor warning_color;
ProXsecNewXhatchStyle p_xhatch_style{};
warning_color.method = PRO_COLOR_METHOD_TYPE;
warning_color.value.type = PRO_COLOR_WARNING;
 
status = ProXsecNewXhatchStyleCreateFromName(L"Wood", warning_color, PRO_XHATCH, &p_xhatch_style);
if (status != PRO_TK_NO_ERROR)
return;
 
ProXSectionItem* xsec_item_arr;
ProXsecMdlname p_xsecmdlname;
status = ProXsecMdlnameAlloc(xsecMdl, p_xsec.xsec_name, &p_xsecmdlname);
if (status != PRO_TK_NO_ERROR)
return;
status = ProXSectionItemsCollect(p_xsecmdlname, NULL, &xsec_item_arr);
if (status != PRO_TK_NO_ERROR)
return;
 
int n_xsec_items = 0;
status = ProArraySizeGet((ProArray)xsec_item_arr, &n_xsec_items);
 
for (int ii = 0; ii < n_xsec_items; ii++)
{
status = ProXSectionItemXhatchStyleSet(xsec_item_arr[ii], item.view, L"Wood", &p_xhatch_style);
}
status = ProXSectionItemsArrFree((ProXSectionItem**)&xsec_item_arr);
ProXsecRegenerate(&p_xsec);
Translate
11-Garnet

@XC_14458268  Thank you so much, I was stuck into this finally got it right.

 

 

 

 

Translate
5-Regular Member

You're welcome! I happened to be looking into this as well. Glad you got it sorted!

Translate