HELLLP!!!! Error Code 0x80004005

HELLLP!!!! Error Code 0x80004005

byzkc54
Contributor Contributor
485 Views
3 Replies
Message 1 of 4

HELLLP!!!! Error Code 0x80004005

byzkc54
Contributor
Contributor

hata.PNG

How can i fix this error? HELP ME!!

 

0 Likes
Accepted solutions (1)
486 Views
3 Replies
Replies (3)
Message 2 of 4

WCrihfield
Mentor
Mentor

Hi @byzkc54.  That error message does not give us any useful information.  What is "Kaydetme Formu"?  It looks like there is a Windows Form showing just behind that error message in your image.  Was that created by an iLogic rule, Inventor add-in, VBA UserForm, external exe program, or what?  If you have access to the source code that created that form, can you post that code here, so we can attempt to debug the code?

 

Edit:  Also, can you translate some of the words to English, so we can understand what it is saying in certain places?  If words are in an image, we can not select them to attempt to translate them to our own language, but if you paste text, we may be able to.

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes
Message 3 of 4

byzkc54
Contributor
Contributor

 

Imports System.Windows.Forms
Imports System.Drawing
Imports System
Imports System.Math
Imports System.Collections
Imports Microsoft.VisualBasic
Imports Autodesk.iLogic.Interfaces
Imports Autodesk.iLogic.Runtime
AddReference "System.Drawing.dll"

Public Sub Main()
Dim form As New System.Windows.Forms.Form()
form.Text = "Kaydetme Formu"

Dim comboBox1 As New System.Windows.Forms.ComboBox()
comboBox1.Items.Add("01")
comboBox1.Items.Add("02")
comboBox1.Location = New System.Drawing.Point(10, 10)
form.Controls.Add(comboBox1)

Dim comboBox2 As New System.Windows.Forms.ComboBox()
comboBox2.Items.Add("A")
comboBox2.Items.Add("B")
comboBox2.Location = New System.Drawing.Point(10, 40)
form.Controls.Add(comboBox2)

Dim saveButton As New System.Windows.Forms.Button()
saveButton.Text = "Kaydet"
saveButton.Location = New System.Drawing.Point(10, 70)
AddHandler saveButton.Click, AddressOf SaveButton_Click
form.Controls.Add(saveButton)

System.Windows.Forms.Application.Run(form)
End Sub

Sub SaveButton_Click(sender As Object, e As EventArgs)
Dim comboBox1 As System.Windows.Forms.ComboBox = CType(sender, System.Windows.Forms.Button).Parent.Controls(0)
Dim comboBox2 As System.Windows.Forms.ComboBox = CType(sender, System.Windows.Forms.Button).Parent.Controls(1)

Dim comboBox1Value As String = comboBox1.SelectedItem.ToString()
Dim comboBox2Value As String = comboBox2.SelectedItem.ToString()

Dim doc As Inventor.Document = ThisApplication.ActiveDocument
doc.PropertySets.Item("Design Tracking Properties").Item("Custom").Value("Name") = comboBox1Value
doc.PropertySets.Item("Design Tracking Properties").Item("Custom").Value("Value") = comboBox2Value
End Sub

0 Likes
Message 4 of 4

Andrii_Humeniuk
Advisor
Advisor
Accepted solution

Hi @byzkc54 . I modified your code a bit and it started working. Changes in lines 43-49.

Imports System.Windows.Forms
Imports System.Drawing
Imports System
Imports System.Math
Imports System.Collections
Imports Microsoft.VisualBasic
Imports Autodesk.iLogic.Interfaces
Imports Autodesk.iLogic.Runtime
AddReference "System.Drawing.dll"

Public Sub Main()
	Dim form As New System.Windows.Forms.Form()
	form.Text = "Kaydetme Formu"
	
	Dim comboBox1 As New System.Windows.Forms.ComboBox()
	comboBox1.Items.Add("01")
	comboBox1.Items.Add("02")
	comboBox1.Location = New System.Drawing.Point(10, 10)
	form.Controls.Add(comboBox1)
	
	Dim comboBox2 As New System.Windows.Forms.ComboBox()
	comboBox2.Items.Add("A")
	comboBox2.Items.Add("B")
	comboBox2.Location = New System.Drawing.Point(10, 40)
	form.Controls.Add(comboBox2)
	
	Dim saveButton As New System.Windows.Forms.Button()
	saveButton.Text = "Kaydet"
	saveButton.Location = New System.Drawing.Point(10, 70)
	AddHandler saveButton.Click, AddressOf SaveButton_Click
	form.Controls.Add(saveButton)
	
	System.Windows.Forms.Application.Run(form)
End Sub

Sub SaveButton_Click(sender As Object, e As EventArgs)
	Dim comboBox1 As System.Windows.Forms.ComboBox = CType(sender, System.Windows.Forms.Button).Parent.Controls(0)
	Dim comboBox2 As System.Windows.Forms.ComboBox = CType(sender, System.Windows.Forms.Button).Parent.Controls(1)
	
	Dim comboBox1Value As String = comboBox1.SelectedItem.ToString()
	Dim comboBox2Value As String = comboBox2.SelectedItem.ToString()
	
	Dim oInvApp As Inventor.Application = ThisApplication
	Dim oDoc As Inventor.Document = oInvApp.ActiveDocument
	Dim oCustom As PropertySet = oDoc.PropertySets("Inventor User Defined Properties")
	Try : oCustom("Name").Value = comboBox1Value
	Catch : oCustom.Add(comboBox1Value, "Name") : End Try
	Try : oCustom("Value").Value = comboBox2Value
	Catch : oCustom.Add(comboBox2Value, "Value") : End Try
End Sub

 

Andrii Humeniuk - CAD Coordinator, Autodesk Certified Instructor

LinkedIn | My free Inventor Addin | My Repositories

Did you find this reply helpful ? If so please use the Accept as Solution/Like.

EESignature

0 Likes