Hi All,
I am trying to get the feature from the selected drafting curve. I used ask drafting curve parents to get the object(Edge).
Now I am asking the features using askedgefeats
now coming to the question:
for eg, my model(simple block feature) has 4 holes(2 simple holes and another 2 patterned from the 2nd simple holw)
if the selected drafting curve belongs to a direct hole feature(ie like simple hole, threaded hole) it is returning correctly the features including the hole package(total number of features returned-3(block, bodyfeature,holepackage))
But if i select the drafting curve belonging to patterned holes, it is returning only block and bodyfeature. It is not even returning the pattern feature.(from which I would get the reference to the holepackage).
I also tried to get the face from the edge and tried using askfacefeats, it is also having the same issue. Please let me know if there is anyother way to get the feature from the drafting curve or refining this code bleow.
int parantscount;
Tag[] parentstag;
theUfSession.Draw.AskDraftingCurveParents(dftcurve.Tag, out parantscount, out parentstag);
foreach (Tag temp_tag in parentstag)
{
//NXObject obj = (NXObject)NXOpen.Utilities.NXObjectManager.Get(parentstag[0]);
NXObject obj = (NXObject)NXOpen.Utilities.NXObjectManager.Get(temp_tag);
NXObject testobj = null;
if (obj.IsOccurrence == true)
{
testobj = (NXObject)obj.Prototype;
}
else
{
testobj = obj;
}
if (testobj.GetType() == typeof(NXOpen.Edge))
{
NXOpen.Edge proto_edg = (NXOpen.Edge)testobj;
//proto_edg.GetFaces()
Tag[] Feat_array_tag;
theUfSession.Modl.AskEdgeFeats(proto_edg.Tag, out Feat_array_tag);
theSession.ListingWindow.Open();
theSession.ListingWindow.WriteLine(Feat_array_tag.Length.ToString());
foreach (Tag feat_tag in Feat_array_tag)
{
NXObject test_obj = (NXObject)NXObjectManager.Get(feat_tag);
theSession.ListingWindow.WriteLine(test_obj.GetType().ToString());
}
}
thanks
Raghavan
There is a direct way for
There is a direct way for getting the edges of the pattern feature in NX open.
patternfeature.getassociatededges()
Thanks
Raghavan