Quantcast
Channel: NX Journaling - Journaling / NXOpen API
Viewing all 783 articles
Browse latest View live

Copy Components to Clipboard

$
0
0

Hi,
I have a sample code to copy component(file from Drive) to clipboard
but present code is working only on one component at once,
can anyone make it to multiple components at once

' NX 10.0.2.6
' Journal created by gashaik on Fri Aug 19 11:29:31 2016 India Standard Time
'
Option Strict Off
Imports System
Imports System.IO
'Imports NXOpen.UI
Imports NXOpen
Imports NXOpen.Assemblies
Imports System.Windows.Forms

Module NXJournal
Sub Main (ByVal args() As String)

Dim theSession As NXOpen.Session = NXOpen.Session.GetSession()
Dim workPart As NXOpen.Part = theSession.Parts.Work
Dim displayPart As NXOpen.Part = theSession.Parts.Display
Dim theUI As UI = UI.GetUI()

Dim components1(0) As NXOpen.Assemblies.Component
components1(0) = CType(theUI.SelectionManager.GetSelectedObject(0), NXOpen.Assemblies.Component)

Dim c_part As Part = Nothing
c_part = components1(0).Prototype
Dim directory As String = Path.GetDirectoryName(c_part.FullPath)
Dim pth as string= c_part.FullPath

Dim f() As String = {pth}
Dim d As New DataObject(DataFormats.FileDrop, f)
Clipboard.Clear()
Clipboard.SetDataObject(d, True)

MessageBox.Show("File Copied to Clipboard From : "& pth)

'System.Diagnostics.Process.Start("explorer.exe", "/select,"& pth)

End Sub
End Module


Get Arbitrary Note Values inside a Custom Symbol

$
0
0

Hi all,

I am trying with a code below to extract arbitrary note values inside a custom symbol but not successful. Can any one help me in getting this.

Below is the sample file containing custom symbol for testing purpose.
https://goo.gl/ZU7y8O

Option Strict Off
Imports System
Imports NXOpen

Module NXJournal
Sub Main (ByVal args() As String)

Dim theSession As NXOpen.Session = NXOpen.Session.GetSession()
Dim workPart As NXOpen.Part = theSession.Parts.Work
Dim displayPart As NXOpen.Part = theSession.Parts.Display
Dim theUI As UI = UI.GetUI()
Dim draftingCustomSymbolBuilder1 As NXOpen.Annotations.DraftingCustomSymbolBuilder
draftingCustomSymbolBuilder1 = workPart.Annotations.CustomSymbols.CreateDraftingCustomSymbolBuilder(CType(theUI.SelectionManager.GetSelectedObject(0), NXOpen.Annotations.CustomSymbol))
draftingCustomSymbolBuilder1.SelectText(0)
Dim arbitrarynotetitle1() As String
arbitrarynotetitle1 = draftingCustomSymbolBuilder1.GetArbitraryNoteTitle()
theSession.listingwindow.open()
theSession.listingwindow.writeline(arbitrarynotetitle1(0))

Dim nXObject1 As NXOpen.NXObject
nXObject1 = draftingCustomSymbolBuilder1.Commit()
draftingCustomSymbolBuilder1.Destroy()

End Sub
End Module

Notes in a Current Drawing Sheet

$
0
0

Hi,

Below is the sample i am trying to get all note(s) names in a current drawing sheet or drawing sheet name of a selected note but it's not working. Can some one help me in this.

Option Strict Off
Imports System
Imports NXOpen
Imports NXOpen.UF
Imports NXOpenUI
Imports NXOpen.Utilities
Imports NXOpen.Annotations
Imports NXOpen.Drawings

Module GetWordInfo
Dim s As Session = Session.GetSession()
Dim ufs As UFSession = UFSession.GetUFSession()
Dim lw As ListingWindow = s.ListingWindow

Sub Main()
Dim dp As Part = s.Parts.Display
Dim nc As NoteCollection = dp.Notes
Dim wp As Part = s.Parts.Work
Dim dwgs As Drawings.DrawingSheetCollection
Dim sheetTag As Tag = Nothing
dwgs = dp.DrawingSheets
Dim notestring() As String
lw.Open()

'Dim laSheet As DrawingSheet = wp.DrawingSheets().CurrentDrawingSheet
'For Each notename As Note In laSheet.Notes
'lw.WriteLine(notename.Name)
'Next

For Each sheet As Drawings.DrawingSheet In dwgs
sheet.Open()
For Each a_note As Note In nc
notestring = a_note.GetText()
lw.WriteLine(sheet.Name & " , "& a_note.DrawingSheetname & " , "& notestring(0) )
Next
Next
end1:
End Sub

Public Function GetUnloadOption(ByVal dummy As String) As Integer
'Unloads the image immediately after execution within NX
GetUnloadOption = NXOpen.Session.LibraryUnloadOption.Immediately
End Function
End Module

Avoid selecting point

$
0
0

Hi,

How to avoid selecting point(like line start point,end point,arc center)
in mask.

I am using(Blockstyler selection block)
selection0->GetProperties()->SetSelectionFilter("SelectionFilter",Selection::SelectionAction::SelectionActionClearAndEnableSpecific,mask);

in mask i am using
( UF_line_type, 0, 0 );
( UF_circle_type, 0, 0 );
( UF_conic_type, 0, 0 );
( UF_edge_type, 0, 0 );
( UF_solid_type, 0, UF_UI_SEL_FEATURE_ANY_EDGE);
( UF_section_edge_type, 0, 0 );
( UF_solid_silhouette_type, 0, 0 );
I have to restrict selecting point in drafting view.
Thanks

Print Update Error

$
0
0

Hi together!:)
I am trying to automate a NX update. Unfortunately,I encountered an error. My .fem file is linked to an idealized part. If I am changing the idealized part geometry, the .fem file shall adapt. If the idealized part is somehow unstable, the .fem is not updating properly.
If I am trying to update the .fem model to a idealized part, which is broken, it throws the error "error: tool body is completely outside target body" or something like that. Nevertheless, the .fem file keeps on updating and pretends that everything is fine. The mesh is different than expected, but the body is meshed.
How can I tell my NX journal, that it shall write out this "update error" into a txt file?

I already read myself into "Update.Errorlist" and SetDefaultUpdateFailureAction etc., but I was not able to find a working solution :(

I found something like this:

Dim myErrList As NXOpen.ErrorList
For i As Integer = 0 To myErrList.Length - 1
lw.WriteLine("Error number: "& i.ToString)
lw.WriteLine(""& ErrList.GetErrorInfo(i).ErrorCode & ": "& myErrList.GetErrorInfo(i).Description)
lw.WriteLine("")
Next

But this is not working due to the error:"object reference not set to an instance of an object"

Thank you very much!

Regards
Benny

"Batch-Only" Programm

$
0
0

Hello,

i'm trying to write a tool in VB.NET which only converts a specific reference set into a step file (and either with visible or with hidden parts).

Now i am looking for a way without using the NX Journal Playback. I have a .net author license but i dont know how to set up the code for a batch-programm.
I don't want to use an interactive NX session, just start a tool from console and let the step translator do his job (unfortunately, i have to select some parts with the API)

I think my problem is the "Session"-Part:

            theSession = Session.GetSession()
            workPart = theSession.Parts.Work
            displayPart = theSession.Parts.Display

Whats the correct way to initialize them when using batch? Is there a "full sample"? I couldn't find any tutorials for this... (Remoting is the wrong thing i guess?)

Thanks in Advance!

Best Regards,
Ery

Select from same body only

$
0
0

Hi everyone. This is such a great community.

I would like to know if NXOpen has the functionality to limit selection to the same body.

For example, if you use the "delete face" button, once you select a face you can only select faces of that solid body. Can you do the same in NXOpen for your own functions?

Essentially what I would like is to add this to the "extend sheet" button if possible so that when selecting sheet body edges, once you have selected one edge, it will not pick edges of other sheet bodies. Even better would be if this could be toggled.

If you need me to explain further or give examples of why I want this then just ask.

Thanks!

Remove special characters

$
0
0

Hello Everyone,

I have assembly with more than 1500 parts but with special characters like (-,+,?,$, ,.,ü,ä,ö). How can I remove those characters from all parts and sub assembly.

Thanks in advance.


List of parts, Add to assembly.

$
0
0

Hello,

I have a list of parts that I want to add to an assembly in NX 10 with team center.

I already have code to capture the list of part. Am really just looking for how to add the latest revision of the item.

When I journaled recorder a journal it looked like the explicit revision number was captured.

Dose any one have a small snippet that will add the latest revision of a part to the current work part?

detail view zone

$
0
0

Hi,

I am trying to find zone of detail view on drawing.
My focus is to replace label on parent & I am thinking to replace that with note(with detail & zone information),
but if i have label selected(while creating detail view) , then in my parent view I have a leader pointed to that particular detail & replacing with note will only place note without leader.

Please suggest/ some sample code.Hope you are getting my point.
Thanks

Cycling through all tables in a sheet in C++

$
0
0

Hey Guys,

So Im extremely new and I need to create some items based off information in a few tabular notes. It has informations like assemblies and mateterial and sterilzation info. I want to write something that will cycle through the information but I wanted to do it in C++. I ahve seen a way to do it in .NET but I cant seem to find any information in the documentatiojn on how to access tables with C++. Any ideas?

Best wishes,

Jelrae_Farsun

"Liveupdate" in NX Journal

$
0
0

Hello,

i'm working at a journal which creates a hugh number of colored points on the workpart. The problem is, that the function "Workpart.Points.CreatePoint" and "NXOpen.Features.PointFeatureBuilder" take most of the time and therefore the journal is slow.
I think one reason is that NX does an update every time a point is created.
So my question is: Is there a way to create points without "updating" NX, and do the update at the end of the journal for all points together?
I hope the journal becomes faster this way...

Thanks.

Johannes

Cycling through all tables in a Sheet (layers in object?)

$
0
0

Im trying to get something that will collect all the tables from a specific layer/sheet. I want to then search through them for specific tables and then export specific information from the tables. I have an idea for how to search through the tables and export specific information from it, but I haven't been able to figure out how to get access to the tables to begin with. I have found I can use GetAllObjectsOnLayer to get all the objects, but I cannot figure out how to get the tables specifically out of that, or how to go through that data. Any idea?

Not a tabular note......

$
0
0

Hey guys,

So I'm still trying to write some code to read off a table. I have tried to write something to check the first cell in each table for a name(one of the names of the table I want to extract). I manage to cycle through tables 0 and 1, but then I get an error that the object being passed for 3 isnt a tabular note. Anyone know why it would be giving me that error given the code I have? I thought I made it so it would only have tabular notes in that list.

Option Strict Off
Imports System
Imports System.Collections.GenericImports NXOpen
Imports NXOpen.UF 
Module export_tabular_notes
 
    Dim theSession As Session = Session.GetSession()Dim theUfSession As UFSession = UFSession.GetUFSession()Dim workPart As Part = theSession.Parts.Work 
    Sub Main() 
        Dim lw As ListingWindow = theSession.ListingWindow
        lw.Open() 
        Dim myTabNotes AsNew List(Of Tag)
        FindTabularNotes(myTabNotes) 
        lw.WriteLine("Number of tabular notes found: "& myTabNotes.Count.ToString)
        lw.WriteLine("") 
        lw.WriteLine("First tabular note info:")
        lw.WriteLine("") 
        Dim numSections AsInteger=0
        theUfSession.Tabnot.AskNmSections(myTabNotes.Item(0), numSections)
        lw.WriteLine("Number of sections in tabular note: "& numSections.ToString) 
        Dim numRows AsInteger=0
        theUfSession.Tabnot.AskNmRows(myTabNotes.Item(0), numRows)
        lw.WriteLine("Number of rows in tabular note: "& numRows.ToString) 
        Dim numCols AsInteger=0
        theUfSession.Tabnot.AskNmColumns(myTabNotes.Item(0), numCols)
        lw.WriteLine("Number of columns in tabular note: "& numCols.ToString)
        lw.WriteLine("") 
        Dim rowTag As Tag =NothingDim colTag As Tag =NothingDim cellTag As Tag =Nothing 
 
	   Dim labelTables AsNew List(Of Tag) 
	   For z AsInteger=0To myTabNotes.Count-1 
			lw.WriteLine(z)'for testing purposes
			theUfSession.Tabnot.AskNthRow(myTabNotes.Item(z), 0, rowTag)
			theUfSession.Tabnot.AskNthColumn(myTabNotes.Item(z), 0, colTag)
                theUfSession.Tabnot.AskCellAtRowCol(rowTag, colTag, cellTag)Dim cellText AsString=""Dim evalCellText AsString=""
                theUfSession.Tabnot.AskCellText(cellTag, cellText)
                theUfSession.Tabnot.AskEvaluatedCellText(cellTag, evalCellText) 
			if cellText ="IMPLANT COMPONENTS"Then 
				labelTables.Add(myTabNotes.Item(z))EndIf 
	   Next 
 
    EndSub 
 
    Sub FindTabularNotes(ByRef tagList As List(Of Tag)) 
        Dim tmpTabNote As NXOpen.Tag= NXOpen.Tag.Null 
        Do
            theUfSession.Obj.CycleObjsInPart(workPart.Tag, UFConstants.UF_tabular_note_type, tmpTabNote)If tmpTabNote = NXOpen.Tag.NullThenContinueDoEndIfIf tmpTabNote <> NXOpen.Tag.NullThen 
                tagList.Add(tmpTabNote) 
            EndIfLoop Until tmpTabNote = NXOpen.Tag.Null 
    EndSub 
EndModule

Accessing user parameters

$
0
0

Hello everybody,

I am new to NX programming and I created a face selection UI.
Is it possible to access the user parameters from the selected face?
I haven't really found a solution online because the face selection
is a taggedobject and you can only access the user parameters if its
an NXopen object, can i convert this or are there other ways around?

Thank you in advance.


Batch convert JT to UG Part from folder

$
0
0

Hi,

As I said in Subject, can any one help me with a code which browses a folder and process all .JT files in it and converts to .PRT with same name.

Extracting Title Block Information

$
0
0

Hello Again,

I'm slowly crawling towards the end of my first Journal. I have with your help managed to get a bit of code to locate the two tables I am interested in. Extracting the information from them is the next step, which I already have some start in.

That being said, I have stumbled upon a new problem. We use a template to start a drawing, so I thought the title block would be stored in the same location each time. So I made a journal and tried to just copy that location over. Here is the code.

Sub FindTitleBlockInformation(ByRef tagList As List(OfString)) 
		'--------------------------------------' Finds the title bocks in the sessions'-------------------------------------- 
		Dim titleblocks1(3)As Annotations.TitleBlockDim titleBlock1 As Annotations.TitleBlock=CType(workPart.FindObject("HANDLE R-147862"), Annotations.TitleBlock) 
		titleblocks1(0)= titleBlock1
		Dim titleBlock2 As Annotations.TitleBlock=CType(workPart.FindObject("HANDLE R-169015"), Annotations.TitleBlock) 
		titleblocks1(1)= titleBlock2
		Dim titleBlock3 As Annotations.TitleBlock=CType(workPart.FindObject("HANDLE R-197476"), Annotations.TitleBlock) 
		titleblocks1(2)= titleBlock3
		Dim titleBlock4 As Annotations.TitleBlock=CType(workPart.FindObject("HANDLE R-393572"), Annotations.TitleBlock) 
		titleblocks1(3)= titleBlock4
		Dim editTitleBlockBuilder1 As Annotations.EditTitleBlockBuilder
		editTitleBlockBuilder1 = workPart.DraftingManager.TitleBlocks.CreateEditTitleBlockBuilder(titleblocks1) 
		Dim titleBlockCellBuilderList1 As Annotations.TitleBlockCellBuilderList
		titleBlockCellBuilderList1 = editTitleBlockBuilder1.Cells 
		'--------------------------------------' Finds the cells in the title blocks''-------------------------------------- 
		Dim taggedObject1 As TaggedObject
		taggedObject1 = titleBlockCellBuilderList1.FindItem(0) 
		Dim titleBlockCellBuilder1 As Annotations.TitleBlockCellBuilder=CType(taggedObject1, Annotations.TitleBlockCellBuilder) 
		Dim taggedObject2 As TaggedObject
		taggedObject2 = titleBlockCellBuilderList1.FindItem(1) 
		Dim titleBlockCellBuilder2 As Annotations.TitleBlockCellBuilder=CType(taggedObject2, Annotations.TitleBlockCellBuilder) 
		Dim taggedObject3 As TaggedObject
		taggedObject3 = titleBlockCellBuilderList1.FindItem(10) 
		Dim titleBlockCellBuilder3 As Annotations.TitleBlockCellBuilder=CType(taggedObject3, Annotations.TitleBlockCellBuilder) 
		Dim PIN Asstring
		PIN = titleBlockCellBuilder1.EditableText 
		Dim INITIALS Asstring
		INITIALS = titleBlockCellBuilder2.EditableText 
		Dim ImplantName Asstring
		ImplantName = titleBlockCellBuilder3.EditableText 
		tagList.Add(PIN)
		tagList.Add(INITIALS)
		tagList.Add(ImplantName) 
	EndSub

But I then ran it in another drawing to test to make sure it would follow through, and as you can guess, it did not. So my question is, how do I access the information from the populate title block tool reliably? I know it will have the same structure each time (I.E the same 11 items in the same order) There will be multiple sheets with the same information possibly presented in a different format for the table, but still present. Any ideas? I'm going to go back to the docs to see if I'm missing something glaringly obvious.

Equivalent of Protection & BundleSegment (In CATIA)

$
0
0

Hello,

I used to develop application in CAA CATIA.
Now in my new application for NX, I want to know which component is equivalent to bundle Segment(CATIBundleSegment) and protection(CATEhiProtection) in NXOpen?!

Thanks in Advance,
Marrouchi Ramzi

Searching through Table (Can I limit the search to sheet one?)

$
0
0

Hey Guys!

So I've almost managed to finish this Journal. I have it cycling through my drawings, finding tables and storing them. 2 problems though.

1) Its still finding a table that it doesnt seem to like. I have the function looking at the first cell of the table to check for a name. I seem to have found a table which does not have that cell. What kind of table doesnt have asingle cell and how can I exclude it form the search? Or is there a was to handle that error and tell it to skip that table and keep going? I think the later would be easier to do

2) It currently goes through every sheet in the drawing, which it really doesn't need to do since all the information I require is on the first sheet. Is there a way to limit the sheets it is searching in?

Here is the code for reference. I will post it to the fourm in its finished form once I finally get it working 100%

Option Strict Off
Imports System
Imports System.Collections.GenericImports NXOpen
Imports NXOpen.UF 
PublicClass Label
 
    PublicProperty AssemblyName AsString 
    PublicProperty AssemblyMaterial As List(OfString) 
EndClass 
PublicClass LabelCollection
 
    Public PIN AsString 
    PublicProperty Initials AsString 
    PublicProperty ImplantName AsString 
    PublicProperty LabelSet AsNew List(Of Label) 
EndClass 
Module Label_Information_Extraction
 
	Dim theSession As Session = Session.GetSession()Dim theUfSession As UFSession = UFSession.GetUFSession()Dim workPart As Part = theSession.Parts.Work 
	Sub Main() 
		'--------------------------------------' Opens the Listing Window'-------------------------------------- 
		Dim lw As ListingWindow = theSession.ListingWindow
		lw.Open() 
		'--------------------------------------' Variable Declirations for Tible Block Extraction'-------------------------------------- 
		Dim PatientLabels AsNew LabelCollection
 
		'--------------------------------------' Variable Declirations for Tabel Extraction'-------------------------------------- 
		Dim myTabNotes AsNew List(Of Tag) 
		'--------------------------------------' Finds the FOUR tables we are interested in and store them in the list of Tag's myTabNotes'-------------------------------------- 
		FindTabularNotes(myTabNotes, lw) 
		'--------------------------------------' States what we found with the Find Tablare notes section'-------------------------------------- 
		lw.WriteLine("Number of tabular notes found: "& myTabNotes.Count.ToString)
		lw.WriteLine("") 
		'lw.WriteLine("First tabular note info:")'lw.WriteLine("") 
		'Dim numSections As Integer = 0'theUfSession.Tabnot.AskNmSections(myTabNotes.Item(0), numSections)'lw.WriteLine("Number of sections in tabular note: " & numSections.ToString) 
		'Dim numRows As Integer = 0'theUfSession.Tabnot.AskNmRows(myTabNotes.Item(0), numRows)'lw.WriteLine("Number of rows in tabular note: " & numRows.ToString) 
		'Dim numCols As Integer = 0'theUfSession.Tabnot.AskNmColumns(myTabNotes.Item(0), numCols)'lw.WriteLine("Number of columns in tabular note: " & numCols.ToString)'lw.WriteLine("") 
		'--------------------------------------' Finds the two tables we are interested in and store them in the list of Tag's myTabNotes'--------------------------------------
		lw.WriteLine("Searching in the Tabular note now")
		TableLabelInformationExtract(myTabNotes,lw, PatientLabels) 
		lw.WriteLine("The PIN is "& PatientLabels.PIN)
		lw.WriteLine("The Patient Initials are "& PatientLabels.Initials)
		lw.WriteLine("The Implant is a "& PatientLabels.ImplantName) 
	EndSub 
 
	Sub FindTabularNotes(ByRef tagList As List(Of Tag), lw As ListingWindow) 
		Dim tmpTabNote As NXOpen.Tag= NXOpen.Tag.NullDim NxType AsIntegerDim NxSubtype AsIntegerDim rowTag As Tag =NothingDim colTag As Tag =NothingDim cellTag As Tag =Nothing 
		Do
			theUfSession.Obj.CycleObjsInPart(workPart.Tag, UFConstants.UF_tabular_note_type, tmpTabNote) 
			If tmpTabNote <> NXOpen.Tag.NullThen 
				theUfSession.Obj.AskTypeAndSubtype(tmpTabNote, NxType, NxSubtype) 
				If NxSubtype = UFConstants.UF_tabular_note_subtypeThen 
					theUfSession.Tabnot.AskNthRow(tmpTabNote, 0, rowTag)
					theUfSession.Tabnot.AskNthColumn(tmpTabNote, 0, colTag)
					theUfSession.Tabnot.AskCellAtRowCol(rowTag, colTag, cellTag)Dim cellText AsString=""Dim evalCellText AsString=""
					theUfSession.Tabnot.AskCellText(cellTag, cellText)
					theUfSession.Tabnot.AskEvaluatedCellText(cellTag, evalCellText) 
					If cellText ="IMPLANT COMPONENTS"OR cellText ="CUSTOM INSTRUMENTS"OR cellText ="PIN"OR cellText ="IMPLANT TYPE"Then 
						lw.WriteLine("The table being stored Contains "& cellText)
						tagList.Add(tmpTabNote) 
					EndIf 
				EndIf 
			EndIf 
		Loop Until tmpTabNote = NXOpen.Tag.Null 
	EndSub 
    Sub TableLabelInformationExtract(tagList As List(Of Tag), lw As ListingWindow, ByRef PatientInformation As LabelCollection) 
        '--------------------------------------' Variable Declirations for Tible Block Information Extraction'-------------------------------------- 
        Dim rowTag As Tag =NothingDim colTag As Tag =NothingDim cellTag As Tag =NothingDim numRows AsInteger=0Dim numCols AsInteger=0Dim tempLabel AsNew Label
        Dim tempName AsString=""Dim tempMaterialList AsNew List(OfString)Dim cellText AsString=""Dim evalCellText AsString="" 
        For z AsInteger=0To tagList.Count-1 
            theUfSession.Tabnot.AskNmColumns(tagList.Item(z), numCols)
            theUfSession.Tabnot.AskNmRows(tagList.Item(z), numRows) 
            theUfSession.Tabnot.AskNthRow(tagList.Item(z), 0, rowTag)
            theUfSession.Tabnot.AskNthColumn(tagList.Item(z), 0, colTag)
            theUfSession.Tabnot.AskCellAtRowCol(rowTag, colTag, cellTag)
            theUfSession.Tabnot.AskCellText(cellTag, cellText)
            theUfSession.Tabnot.AskEvaluatedCellText(cellTag, evalCellText) 
            If cellText ="IMPLANT COMPONENTS"Or cellText ="CUSTOM INSTRUMENTS"Then 
                For y AsInteger=2To numRows -1 
                    theUfSession.Tabnot.AskNthRow(tagList.Item(z), y, rowTag)
                    theUfSession.Tabnot.AskNthColumn(tagList.Item(z), 5, colTag)
                    theUfSession.Tabnot.AskCellAtRowCol(rowTag, colTag, cellTag)
                    theUfSession.Tabnot.AskCellText(cellTag, cellText)
                    theUfSession.Tabnot.AskEvaluatedCellText(cellTag, evalCellText) 
                    lw.WriteLine("We are in row "& y)'for testing purposes	 
                    If cellText <>""And cellText <> tempName Then
                        tempLabel.AssemblyName= tempName
                        tempLabel.AssemblyMaterial= tempMaterialList
                        PatientInformation.LabelSet.Add(tempLabel)
                        tempName =""
                        tempMaterialList.Clear()EndIf 
                    If cellText <>""Then
                        tempName = cellText
                    EndIf 
                    theUfSession.Tabnot.AskNthRow(tagList.Item(z), y, rowTag)
                    theUfSession.Tabnot.AskNthColumn(tagList.Item(z), 3, colTag)
                    theUfSession.Tabnot.AskCellAtRowCol(rowTag, colTag, cellTag)
                    theUfSession.Tabnot.AskCellText(cellTag, cellText)
                    theUfSession.Tabnot.AskEvaluatedCellText(cellTag, evalCellText) 
                    lw.WriteLine("The material present is "& cellText)'for testing purposes 
                    If tempName <>""AndNot tempMaterialList.Contains(cellText)Then
                        tempMaterialList.Add(cellText)
                        lw.WriteLine("The material stored is "& cellText)'for testing purposes 
                    Else
                        lw.WriteLine("Material already in List")EndIf 
                Next 
            ElseIf cellText ="PIN"Then 
                theUfSession.Tabnot.AskNthRow(tagList.Item(z), 1, rowTag)
                theUfSession.Tabnot.AskNthColumn(tagList.Item(z), 0, colTag)
                theUfSession.Tabnot.AskCellAtRowCol(rowTag, colTag, cellTag)
                theUfSession.Tabnot.AskCellText(cellTag, cellText)
                theUfSession.Tabnot.AskEvaluatedCellText(cellTag, evalCellText) 
                PatientInformation.PIN= cellText
 
                theUfSession.Tabnot.AskNthRow(tagList.Item(z), 1, rowTag)
                theUfSession.Tabnot.AskNthColumn(tagList.Item(z), 1, colTag)
                theUfSession.Tabnot.AskCellAtRowCol(rowTag, colTag, cellTag)
                theUfSession.Tabnot.AskCellText(cellTag, cellText)
                theUfSession.Tabnot.AskEvaluatedCellText(cellTag, evalCellText) 
                PatientInformation.Initials= cellText
 
            ElseIf cellText ="IMPLANT TYPE"Then 
                theUfSession.Tabnot.AskNthRow(tagList.Item(z), 1, rowTag)
                theUfSession.Tabnot.AskNthColumn(tagList.Item(z), 0, colTag)
                theUfSession.Tabnot.AskCellAtRowCol(rowTag, colTag, cellTag)
                theUfSession.Tabnot.AskCellText(cellTag, cellText)
                theUfSession.Tabnot.AskEvaluatedCellText(cellTag, evalCellText) 
                PatientInformation.ImplantName= cellText
            EndIf 
        Next 
    EndSub 
	Sub FindTitleBlockInformation(ByRef tagList As LabelCollection) 
		'--------------------------------------' Finds the title bocks in the sessions'-------------------------------------- 
		Dim titleblocks1(3)As Annotations.TitleBlockDim titleBlock1 As Annotations.TitleBlock=CType(workPart.FindObject("HANDLE R-147862"), Annotations.TitleBlock) 
		titleblocks1(0)= titleBlock1
		Dim titleBlock2 As Annotations.TitleBlock=CType(workPart.FindObject("HANDLE R-169015"), Annotations.TitleBlock) 
		titleblocks1(1)= titleBlock2
		Dim titleBlock3 As Annotations.TitleBlock=CType(workPart.FindObject("HANDLE R-197476"), Annotations.TitleBlock) 
		titleblocks1(2)= titleBlock3
		Dim titleBlock4 As Annotations.TitleBlock=CType(workPart.FindObject("HANDLE R-393572"), Annotations.TitleBlock) 
		titleblocks1(3)= titleBlock4
		Dim editTitleBlockBuilder1 As Annotations.EditTitleBlockBuilder
		editTitleBlockBuilder1 = workPart.DraftingManager.TitleBlocks.CreateEditTitleBlockBuilder(titleblocks1) 
		Dim titleBlockCellBuilderList1 As Annotations.TitleBlockCellBuilderList
		titleBlockCellBuilderList1 = editTitleBlockBuilder1.Cells 
		'--------------------------------------' Finds the cells in the title blocks''-------------------------------------- 
		Dim taggedObject1 As TaggedObject
		taggedObject1 = titleBlockCellBuilderList1.FindItem(0) 
		Dim titleBlockCellBuilder1 As Annotations.TitleBlockCellBuilder=CType(taggedObject1, Annotations.TitleBlockCellBuilder) 
		Dim taggedObject2 As TaggedObject
		taggedObject2 = titleBlockCellBuilderList1.FindItem(1) 
		Dim titleBlockCellBuilder2 As Annotations.TitleBlockCellBuilder=CType(taggedObject2, Annotations.TitleBlockCellBuilder) 
		Dim taggedObject3 As TaggedObject
		taggedObject3 = titleBlockCellBuilderList1.FindItem(10) 
		Dim titleBlockCellBuilder3 As Annotations.TitleBlockCellBuilder=CType(taggedObject3, Annotations.TitleBlockCellBuilder) 
		Dim PIN Asstring
		PIN = titleBlockCellBuilder1.EditableText 
		Dim INITIALS Asstring
		INITIALS = titleBlockCellBuilder2.EditableText 
		Dim ImplantName Asstring
		ImplantName = titleBlockCellBuilder3.EditableText 
		tagList.PIN= PIN
		tagList.Initials= INITIALS
		tagList.ImplantName= ImplantName
 
	EndSub 
EndModule

CloneObject to Component

$
0
0

Hello everybody,
i have just a simple question. How can i convert my CloneObject to a Component.
After adding a cloneobject i want to build constraints, cause of that i need components of the cloneobjects.

Do anybody have idea to solve it?

Best thanks in advance.

Viewing all 783 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>