Inventor Customization

Inventor Customization

Reply
Contributor
csiddamr
Posts: 19
Registered: ‎03-02-2006
Message 1 of 12 (242 Views)

How to create a hidden custom property?

242 Views, 11 Replies
04-19-2006 02:38 AM
How to create a hidden custom property?

Regards
Reddy
*Teun Ham \(IV9 SP4 / IV10 SP3a\)
Message 2 of 12 (242 Views)

Re: How to create a hidden custom property?

04-19-2006 03:28 AM in reply to: csiddamr
Just look in the Programming Help:

From Inventor:
Help --> Programming Help

Within the Programming Help:
Contents --> Overviews --> Document Properties

Cheers!
--
T. Ham
Mechanical Engineer
CDS Engineering BV

Dual Pentium XEON 2.2 Ghz
2 GB SDRAM
NVIDIA QUADRO4 700 XGL (Driver = 77.18)
18 GB SEAGATE SCSI Hard Disc
3Com Gigabit NIC

Windows 2000 Professional SP4
Autodesk Inventor Series 9 SP4
Autodesk Inventor Series 10 SP3a
--
*Sanjay Ramaswamy \(Autodesk\)
Message 3 of 12 (242 Views)

Re: How to create a hidden custom property?

04-19-2006 10:24 AM in reply to: csiddamr
I'm not sure if the overview mentions this, but if you create a property or
a property set with an underscore ("_") prefix in its name, it will be
hidden. Such properties and property sets do not appear in the collections
and the only way to access them is by their name/id.

Sanjay-


"Teun Ham (IV9 SP4 / IV10 SP3a)" nl> wrote in message news:5146831@discussion.autodesk.com...
Just look in the Programming Help:

From Inventor:
Help --> Programming Help

Within the Programming Help:
Contents --> Overviews --> Document Properties

Cheers!
--
T. Ham
Mechanical Engineer
CDS Engineering BV

Dual Pentium XEON 2.2 Ghz
2 GB SDRAM
NVIDIA QUADRO4 700 XGL (Driver = 77.18)
18 GB SEAGATE SCSI Hard Disc
3Com Gigabit NIC

Windows 2000 Professional SP4
Autodesk Inventor Series 9 SP4
Autodesk Inventor Series 10 SP3a
--
Contributor
csiddamr
Posts: 19
Registered: ‎03-02-2006
Message 4 of 12 (242 Views)

Re: How to create a hidden custom property?

04-19-2006 09:41 PM in reply to: csiddamr
I want to create a custom property that should not be visible to the user.
But in the API help mentioned is hiding from the APIs.
If i create a custom property prefix with "_" it is hiding from the API (count will not count this attribute). But it is visible to the user.

What i want is I want to create a custom property that is hidden ( should not be visible ) to the user . Is it possible.

Thanks in Advance,

Regards,
Reddy
*Teun Ham \(IV9 SP4 / IV10 SP3a\)
Message 5 of 12 (242 Views)

Re: How to create a hidden custom property?

04-20-2006 12:59 AM in reply to: csiddamr
You clearly have not read the Programming Help...

The first example on the 3rd page shows how you can create a new propertyset
with a new property. This property set is NOT visible to the user.

Anyway, see if this helps (no error trapping):

Sub CreateInvisiblePropertySet()

Dim oDoc As Document
Dim oCustomPropertySet As PropertySet
Dim oCustomProperty As Property

Set oDoc = ThisApplication.ActiveDocument
Set oCustomPropertySet = oDoc.PropertySets.Add("MyCustomPropertySet")
Set oCustomProperty = oCustomPropertySet.Add("MyValue", "InvisibleProperty")

End Sub

Sub ShowValueOfHiddenPropertySet()

Dim oDoc As Document
Dim oCustomPropertySet As PropertySet
Dim oCustomProperty As Property

Set oDoc = ThisApplication.ActiveDocument
Set oCustomPropertySet = oDoc.PropertySets.Item("MyCustomPropertySet")
Set oCustomProperty = oCustomPropertySet.Item("InvisibleProperty")

MsgBox oCustomProperty.Value

End Sub

--
T. Ham
Mechanical Engineer
CDS Engineering BV

Dual Pentium XEON 2.2 Ghz
2 GB SDRAM
NVIDIA QUADRO4 700 XGL (Driver = 77.18)
18 GB SEAGATE SCSI Hard Disc
3Com Gigabit NIC

Windows 2000 Professional SP4
Autodesk Inventor Series 9 SP4
Autodesk Inventor Series 10 SP3a
--
Distinguished Contributor
Machado
Posts: 210
Registered: ‎12-15-2005
Message 6 of 12 (242 Views)

Re: How to create a hidden custom property?

04-24-2006 07:37 AM in reply to: csiddamr
Hi,Teun?

You code gives a error.
I think that this is an interesting subject, can someone explain this and how to create and edit custom porpertyset.

Thanks.
*Chris \(IV11 Pro. SPxx\)
Message 7 of 12 (242 Views)

Re: How to create a hidden custom property?

04-24-2006 07:49 AM in reply to: csiddamr
Not sure what error msg you got, but I guess you have to run createproterty
before find it.
Chris
wrote in message news:5152107@discussion.autodesk.com...
Hi,Teun?

You code gives a error.
I think that this is an interesting subject, can someone explain this and
how to create and edit custom porpertyset.

Thanks.
*Chris \(IV11 Pro. SPxx\)
Message 8 of 12 (242 Views)

Re: How to create a hidden custom property?

04-24-2006 07:52 AM in reply to: csiddamr
I'm just curious, why you need to hide the property?

wrote in message news:5148282@discussion.autodesk.com...
I want to create a custom property that should not be visible to the user.
But in the API help mentioned is hiding from the APIs.
If i create a custom property prefix with "_" it is hiding from the API
(count will not count this attribute). But it is visible to the user.

What i want is I want to create a custom property that is hidden ( should
not be visible ) to the user . Is it possible.

Thanks in Advance,

Regards,
Reddy
Distinguished Contributor
Machado
Posts: 210
Registered: ‎12-15-2005
Message 9 of 12 (242 Views)

Re: How to create a hidden custom property?

04-24-2006 02:24 PM in reply to: csiddamr
HI,Chris!

The error displayed in the Teun code is the following:

Run time error 429
Activex component can´t create object

So what´s wrong here, can someone help on this?

Thanks.
*Chris \(IV11 Pro. SPxx\)
Message 10 of 12 (242 Views)

Re: How to create a hidden custom property?

04-24-2006 02:53 PM in reply to: csiddamr
Huh... it's weird ... I did not get that error. Teun's code has 2 subs
1) Run the first sub to add the customer property to the file
2) Run the second sub to show the property that was created in the first sub
You shouldn't run both at the same time 'caused nothing to show !
Other than that, Teun should be the right person to answer your question
Chris

wrote in message news:5152905@discussion.autodesk.com...
HI,Chris!

The error displayed in the Teun code is the following:

Run time error 429
Activex component can´t create object

So what´s wrong here, can someone help on this?

Thanks.
Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.