Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations IDS on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Journal Add workpart to TaggedObejct

Status
Not open for further replies.

MANox

Mechanical
Apr 2, 2007
121
Hello,

I writing small journal for export pdf, dxf, parasolid and step for each part in assembly.
I can select all parts in assembly, but I can't add main part (or workpart) to selection group.
I use standard function:
Code:
Function SelectComponents(ByVal prompt As String, ByRef selObj() as TaggedObject) As Selection.Response
	 
	Dim theUI as UI = UI.GetUI
	Dim title As String = "Select components"
	Dim includeFeatures As Boolean = False
	Dim keepHighlighted As Boolean = False
        Dim selAction As Selection.SelectionAction = Selection.SelectionAction.ClearAndEnableSpecific
	Dim scope As Selection.SelectionScope = Selection.SelectionScope.AnyInAssembly
	Dim selectionMask_array(1) As Selection.MaskTriple
	 
	With selectionMask_array(0)
		.Type = UFConstants.UF_component_type
		.Subtype = UFConstants.UF_all_subtype
	End With
		
	With selectionMask_array(1)
		.Type = UFConstants.UF_component_type
		.Subtype = UFConstants.UF_part_occurrence_subtype 
	End With
	 
	Dim resp as Selection.Response = theUI.SelectionManager.SelectTaggedObjects(prompt, title, scope, selAction, includeFeatures, keepHighlighted, selectionMask_array, selobj)
	If resp = Selection.Response.Ok Then
		Return Selection.Response.Ok
	Else
		Return Selection.Response.Cancel
	End If
	 
End Function

Is it possible to do this?

Best regards

MANox
 
Replies continue below

Recommended for you

I can't help you but I'm all about this tool.
Would love to get this capability!

Good luck

Dave
Automotive Tooling / Aircraft Tooling / Ground Support Structures

NX11, Win 10 Pro
 
Hello,

Isn't better to process all parts in assembly than selecting each part by MaskTriple?

With best regards
Michael
 
Hello,

sometimes I must export all parts, sometimes only few part.
My problem is - how select assembly (no all part - I think about assembly file in assembly tree).
This moment I do it like that:
Code:
Select Case Msgbox("Add assembly too?", MsgBoxStyle.YesNo, "Select assembly too?")
       Case 6
           Add_assembly = true
End Select
and after:
Code:
If Add_assembly = true then
'code
End if
But I would like select assemby with parts selection, if it's possible.

Best regards

MANok
NX11/12
TC10
 
Please provide some example how your structure looks. What You have in main assembly? Solid body, sheet body, etc. ?
Look at this thread, maybe this will help. thread561-346964

With best regards
Michael
 
Hello,

I start from beginging:
1. I have assembly with (p.ex) 5 components.
2. I want open drawing for each component and for assembly.
3. I want export drawing to pdf and dxf and component and assembly to stp, x_t and igs (full assembly and for each component).

My joural do all of these.
But when I selected components to export, I can select only component, I can't select assembly.
I want ask - is it possible to add some maskTriple to select assembly (GD-01.000 on attached movie).

Best regards

MANok

NX11/12
TC10
 
 https://files.engineering.com/getfile.aspx?folder=49ea4bb8-7f1d-4a50-9710-e4b707498983&file=movie.avi
Status
Not open for further replies.

Part and Inventory Search

Sponsor