News:

Interested in some really terrific mobile apps? Visit www.turboapps.com for details.

Main Menu

Property set definitions

Started by nikkipollard, July 09, 2020, 05:56:04 AM

Previous topic - Next topic

0 Members and 0 Guests are viewing this topic.

nikkipollard

.- using vb.net?
Is there a way to read property set definitions for a graphic (Similar to the method for reading custom properties?)
Nikki
TC20 platinum, TC 2015 platinum
TC 2017 with lightworks
TC 2021 platinum
Windows 11 Home 22h

nikkipollard

#1
I found the answer to my own question
Property sets are a property of the graphic called "PropertySets"
They seem to be an array of arrays. If that makes sense.
you will get errors if there isn't  a property set assigned to the Graphic .
If I wanted to get the reference from the predefined IFC property set for windows for a graphic
. The code in vb.Net would be something like this

Dim gWin as IMSIGX.Graphic = ActiveDrawing.Selection(0)
Dim Psets as Object = gwin.Graphics.Properties.Item("PropertySets")
Dim Pnum as Integer = UBound(Pset)
Dim WinProps as Object
Dim Pexists as Boolean = False
For i as Integer = 0 To Pnum

If Psets(i,0) = "Pset_WindowCommon" Then
WinProps = Psets(i,1)
'reference is at the first index of the array,
MsgBox (WinProps(0,1))
Pexists = True
Exit For
End If
Next
If Pexists = False Then
MsgBox ("This graphic doesn't have a window property set assigned to it)
End If



Nikki
TC20 platinum, TC 2015 platinum
TC 2017 with lightworks
TC 2021 platinum
Windows 11 Home 22h