Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to create a hidden custom property?

11 REPLIES 11
Reply
Message 1 of 12
csiddamr
595 Views, 11 Replies

How to create a hidden custom property?

How to create a hidden custom property?

Regards
Reddy
11 REPLIES 11
Message 2 of 12
Anonymous
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
--
Message 3 of 12
Anonymous
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
--
Message 4 of 12
csiddamr
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
Message 5 of 12
Anonymous
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
--
Message 6 of 12
Machado
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.
Message 7 of 12
Anonymous
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.
Message 8 of 12
Anonymous
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
Message 9 of 12
Machado
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.
Message 10 of 12
Anonymous
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.
Message 11 of 12
Machado
in reply to: csiddamr

Ok, i've figured out.
I think it was somekind of interference with a add-in.

Thanks a lot.
Message 12 of 12
Anonymous
in reply to: csiddamr

I am glad you fixed the problem!

Chees,

--
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
--

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report