iProperties part number in drawing doesnt work

iProperties part number in drawing doesnt work

dusan.naus.trz
Advisor Advisor
2,427 Views
13 Replies
Message 1 of 14

iProperties part number in drawing doesnt work

dusan.naus.trz
Advisor
Advisor

Hi,
I do not understand why ilogic can not write the iproperties part number to the drawing. What am I doing wrong? I use an external rule, but MessageBox.Show works and writes to part number no.

Files, video and external ilogic rule, attachment.

Accepted solutions (1)
2,428 Views
13 Replies
Replies (13)
Message 2 of 14

johnsonshiue
Community Manager
Community Manager

Hi! I think I know what you are talking about. There are a few ways to get the desirable behavior. Let me show you a workflow and you may understand why it behaves the way it is right now.

 

1) Open part1.idw.

2) Go to Tools -> Document Settings -> Drawing -> go to the bottom -> Copy Model iProperty Settings -> check "Copy Model iProperties" -> check "Part Number" -> Ok.

3) Run the iLogic rule "Copy" in the part.

4) Go back to the newly copied drawing -> go to Manage -> click on "Update Copied Properties" button.

Now the Part Number will be updated to "0000"

 

The reason why you need to do this is because the Drawing Part Number and other iProperties are separate from the Part document. It is because there could be multiple parts or assemblies documented in a drawing. Which one is driving the properties? Also, the user needs to click on "Update Copied Properties" to commit the change, which prevents drawing being altered accidentally.

Could you try the workflow I described above and see if it works for you?

Many thanks!



Johnson Shiue (johnson.shiue@autodesk.com)
Software Test Engineer
Message 3 of 14

dusan.naus.trz
Advisor
Advisor

Hi.

Thank you very much. I will think about it. I tried it. I will try it on Wednesday when I have more time. Now I have to go home. It's 22:00. I have my way for an 1 hour. I will make a video of the exam and then we will see. Bye. 

0 Likes
Message 4 of 14

dusan.naus.trz
Advisor
Advisor

Hi,

http://beinginventive.typepad.com/being-inventive/2012/11/update-automatically-drawing-properties-fr...

 

Why does it not work?

Dim oControlDef as ControlDefinition = ThisApplication.CommandManager.ControlDefinitions.Item("UpdateCopiedModeliPropertiesCmd")
oControlDef.Execute2(True)

 

I want to automatically copy the Iproperties model, All iProperties

Add this setting for iLogic on the rule: copy, copy to end.

0 Likes
Message 5 of 14

dusan.naus.trz
Advisor
Advisor

Hi

I think. If idw scale the first view of the model and the part number from the first view too.
The main idea in the introduction. Same part number model and drawing. How in iLogic from attachment? In the beginning?

Yes using copy properties. But when part iLogic, then the rest manually?

How do I resolve copy properties using iLogic? Add to existing code. What to add?

First video titled: CZ_version_write_aktiv
there is no copy of the honeymoon using iLogic

Second video titled: EN_OK
there is no copy of the honeymoon using iLogic

Third video titled: ENG_LANGUGE_FAILED
the same iLogic code, some error, did not override properties

Why did not she have a feature on the third video? I do not know. I will observe the behavior of rewriting properties.

Question, but sounded.

How do I resolve copy properties using iLogic? Add to existing code. What to add?iLogic_Copy_iProperties_Part_Number.png

0 Likes
Message 6 of 14

bradeneuropeArthur
Mentor
Mentor

These check marks are not implemented in the API. So that is not possible.

I found a solution to program the copy of the properties piece by piece.

Let me know if you need this too.

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

0 Likes
Message 7 of 14

dusan.naus.trz
Advisor
Advisor

Hi
Not programmed. Yes I understand. Is it possible in the future?
If you have any codes. I'll be glad when you write. I like to try some code. Thank you. 

If I want to use the code I showed, for example, for 100 drawings I had to switch on the copy model Iproperty settings.

Everything would be solved if it could be used. But that is not possible. 

This code works only after applying the first rule, not one rule. Or use opy model Iproperty settings.

iProperties.Value("Project", "Part Number") = iProperties.Value(modelName, "Project", "Part Number") 

If you have any code, you send my. Thank you. 

0 Likes
Message 8 of 14

bradeneuropeArthur
Mentor
Mentor

The easiest to so this is to create an add in for inventor.

This add in will run  a rule based on the save event.

Are you happy with that?

With illogic this isn't done that easy.

I think you need to click a button everytime you want to update.

Otherwise you need to implement a on save code for every existing drawing, which takes a lot of effort from your side.

with an add in all of this is not needed and I would prefer! 

 

please let me know if you are happy with an add-in written in Vb.net

 

Regards,

Autodesk Software: Inventor Professional 2018 | Vault Professional 2018 | Autocad Mechanical 2018
Programming Skills: Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Dimension Component! | Partlist Export! | Derive I-properties! | Vault Prompts Via API! | Vault Handbook/Manual!
Drawing Toggle Sheets! | Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

0 Likes
Message 9 of 14

Crstiano
Collaborator
Collaborator

Hi,

For some reason your need clear the iproperties before in your code, for after realize the update. (Line 53 in your code)

 

Follow the files.

Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.


Cristiano Oliveira
EESignature
ConsultCAD.com

0 Likes
Message 10 of 14

dusan.naus.trz
Advisor
Advisor

Hi,

the attachment does not have code, just ipt and idw. I tried different things. An open drawing does not let me write. I can not even add Custom iproperties. I do not know what you mean to clean up? Do you have a solution?

0 Likes
Message 11 of 14

Crstiano
Collaborator
Collaborator

My bad, follow again.

And Yes, now works good. 

Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.


Cristiano Oliveira
EESignature
ConsultCAD.com

0 Likes
Message 12 of 14

dusan.naus.trz
Advisor
Advisor

I do not understand, the same thing. Files missing Rule or external rule. So you know how to overwrite Part number at idw through my code? Can you repair the code? To Overwrite a Part Number in a Drawing?

0 Likes
Message 13 of 14

Crstiano
Collaborator
Collaborator
Accepted solution

Sorry

Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.


Cristiano Oliveira
EESignature
ConsultCAD.com

Message 14 of 14

dusan.naus.trz
Advisor
Advisor

Hi,

Cristiano you are Perfect. Thank you very much.