Thanks for the answer. I looked into documentation about NXOpen.Features.Thread, but there is not much there about it.
Below is my old code:
Option Strict Off
Imports System
Imports System.Collections.Generic
Imports NXOpen
Imports NXOpen.UF
Module Module1
Dim theSession As Session =...
Hello
I have journal to color all cylindrical faces which are part of thread feature. Everything works perfects on NX12. When I switch to NX2007, it's stopped working. I receive information:
NXOpen.NXException: Unknown feature type in NXOpen.UF.UFModl.AskSymbThreadParms(Tag thread_obj_id...
Thanks @Cowski. So the main problem was with calling view.
editViewSettingsBuilder1 = workPart.SettingsManager.CreateDrawingEditViewSettingsBuilder({dview})
Why is {} so important?
With best regards
Michael
Hello,
I wanna process all detail views to change label on it. Below is my code, but I receive an error "cannot convert detailview to 1-dimensional array view."
Option Strict Off
Imports System
Imports NXOpen
Module NXJournal
Dim theSession As NXOpen.Session = NXOpen.Session.GetSession()...
Thanks @Cowski, this is what I've been looking for. My old code was long and it wasn't process cylindrical face from unparametrised body, that's why I was looking for tweak it out.
below is my code, maybe it will be useful for someone.
Option Strict Off
Imports System
Imports...
...'Partlist.sort(Function(x, y) x.part_name.CompareTo(y.Part_name))
partlist1.sort(AddressOf Comparer)
lw.writeline(" ")
lw.writeline("**********************************************")
lw.writeline("Parts with set mass and density: ")...
Hello,
This journal create attribute in part called Mass_prt and You can call it on drawing. To do this You have to:
- create a note
- in note show symbols, then on category choose relationship
- then You have two options:
- part attribute - attribute from actual part, i.e nonmaster model...
...'Partlist.sort(Function(x, y) x.part_name.CompareTo(y.Part_name))
partlist1.sort(AddressOf Comparer)
lw.writeline(" ")
lw.writeline("**********************************************")
lw.writeline("Parts with set mass and density: ")...
...'Constructor for NX Styler class
'------------------------------------------------------------------------------
Public Sub New()
'**************************************************************************************...
...for NX Styler class
'------------------------------------------------------------------------------
Public Sub New()
'**************************************************************************************...
...& comp_.Value_Name )
next
With saveDialog
.DefaultExt = "xlsx"
.FileName = "My data"
.Filter = "MS Excel Spreadsheets (*.xlsx) | *.xlsx | All Files (*.*) | *.*"
.FilterIndex = 1
.OverwritePrompt = True
.Title = "Select a file where you'd like to save the...
What are values for CYL_CODE? Every file in assembly has this attribute - CYL_CODE or only few of them?
Uncoment this: (after end try)
'lw.writeline(child.Name & " , " & My_atrib)
and change it to something like this:
lw.writeline("Part name: " & child.Name)
lw.writeline("CYL_Code: " &...
...for NX Styler class
'------------------------------------------------------------------------------
Public Sub New()
'**************************************************************************************...
...lw.writeline(comp_.Part_Name & " | " & comp_.Attrib_Name & " | " & comp_.Value_Name )
next
end if
lw.Close
End Sub
'*****************************************************************************************
' Empty run...
...myColor = theSession.Parts.Work.Colors.Find(myDispObj.Color)
ColorNAme = myColor.Label
Dim red As Integer = myColor.GetRgb.R * 255
Dim green As Integer = myColor.GetRgb.G * 255
Dim blue As Integer = myColor.GetRgb.B * 255
myform1.ColorNo = ColorNo
myform1.ColorName = ColorName...
@Cowski thank for the code. I will check it and write some review after that.
@Toost I know that Line, point or surface has no thickness, but in NX You can set width for representation. I writing journal to show selected curve properties like color, layer, type (solid, centreline, dotted) and...
Hello,
If You have small number of components You can Use simple interference. You select 2 bodies and as resulting object -> interference body.
In more complex assemblies I uses Menu -> Analysis -> Assembly Clearance -> Perform Analysis. I set important options: Clearance between...
On customer defaults I found this:
But lines created on file has values from 5 to 13. I'm not sure if I open file from created on different computer I will get the same values.
With best regards
Michael