iProperty Columns in Configuration Table of Model States

iProperty Columns in Configuration Table of Model States

marcel.meyerGRIESSER
Contributor Contributor
238 Views
1 Reply
Message 1 of 2

iProperty Columns in Configuration Table of Model States

marcel.meyerGRIESSER
Contributor
Contributor

Hi all

I'm currently trying to write an iLogic Rule that places a Configuration Table containing the Model State Informations into a Drawing. For that i want to add the table with two additional columns that are custom iProperties. Doing so manually works fine.

But with the script i'm struggling to get them added. Either the function addConfigurationTable() gets an Error ("Wrong Parameter") or the field stays empty (with the second method). I tried both the internal and the normal title of the iProperties.

 

Does anyone have an Idea how i could solve this?

 

Below are my attempts at the script.

oDDoc = ThisDrawing.Document
oSheet = oDDoc.ActiveSheet

Dim modelDoc = ThisDrawing.ModelDocument.FullDocumentName

' Create the placement point for the table
Dim oPoint As Point2d = ThisApplication.TransientGeometry.CreatePoint2d(5, 10)
 
Dim sColumns(0 To 1) As String
	sColumns(0) = "Article_Nr [Custom]"
	sColumns(1) = "Description_DE [Custom]"

' Alternativ Setup for the Columns-Array
'Dim oColTitles() As String = {"Article_Nr [Custom]","Description_DE [Custom]"}


'MessageBox.Show(oSheet.CustomTables.Item(1).Columns.Item(2).InternalTitle.ToString)
'MessageBox.Show(oSheet.CustomTables.Item(1).Columns.Item(3).Title.ToString)

oSheet.CustomTables.AddConfigurationTable(modelDoc.ToString, oPoint, "Variant Table", sColumns)		'oColTitles

' Second way i tried to add the Column (While not using the sColumns Value in the AddConfigurationTable Function
'oSheet.CustomTables.Item(2).Columns.Add("Article_Nr")

 

Best Regards

Marcel Meyer

0 Likes
239 Views
1 Reply
Reply (1)
Message 2 of 2

jkorson
Enthusiast
Enthusiast

I'm sorry you didn't get any quick responses to help you on this issue. Hopefully by now you have solved your issue, but I took snips of your code to use in my code and it worked like expected (I used the first method). 

 

My best educated guess is that you: 

  • The iProperty is misspelled or has extra characters (like a space).
  • The custom iProperty doesn't exist on your model states table.
0 Likes