
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
I have an iLogic script that checks some properties on save, and if those ar enot filled in it opens up a form and asks the user to fill in the data.
Its all working fine, but if I run it on an assembly, it shows for the assembly and then again for each subpart that is beeing saved.
At this point I do not know for what part it is beeing displayed. therfor I would like to open up that particular IPT in the background (behind the form) so the user knows what he is doing, once done the part should be closed again.
but it is not working.. I have no idea on how to open that particular document on its own.
Basically all I want is that if the user sees the form, he should also see the part open in background so he knows what part the form is referenced to.
can this be done?
thanks!
Sub Main() Dim IPJ as String Dim IPJ_Name As String Dim IPJ_Path As String Dim FNamePos As Long 'set a reference to the FileLocations object. IPJ = ThisApplication.FileLocations.FileLocationsFile If IPJ = "C:\VLT_Wrk\Konstruktion2.ipj" Or IPJ = "C:\Users\cad-13\Desktop\TEST\Konstruktion2.ipj" Then Dim odoc As Document = ThisDoc.Document Dim eDocumentType As DocumentTypeEnum = oDoc.DocumentType Select Case eDocumentType Case DocumentTypeEnum.kAssemblyDocumentObject '''IAM Vaultpropwriteback() Propcheckdes(odoc) Case DocumentTypeEnum.kPartDocumentObject '''IPT Propcheckdes(odoc) End Select End If End Sub ''''--------------------------------------'''' Sub Propcheckdes(oDoc As Inventor.Document) Dim Desc as String Dim opened As Boolean = False Desc = iProperties.Value(“Project”, “Description”) Dim odoc2 As Document If String.IsNullOrWhiteSpace(Desc) = True Then odoc2 = ThisApplication.Documents.Open(oDoc.FullFileName, True) opened = True End If Do Until String.IsNullOrWhiteSpace(Desc) = False iLogicForm.ShowGlobal("Pflichtfelder",FormMode.Modal) Desc = iProperties.Value(“Project”, “Description”) Loop If opened Then odoc2.Close End If End Sub
Solved! Go to Solution.