How to "Mark" the part number and revision on a part using iLogic

How to "Mark" the part number and revision on a part using iLogic

roy7BB24
Advocate Advocate
130 Views
2 Replies
Message 1 of 3

How to "Mark" the part number and revision on a part using iLogic

roy7BB24
Advocate
Advocate

Hi All, 

I'm working on a script to try to mark a part I've drawn with both its part number and revision, ideally using the mark tool. The intended operation is I'll create a sketch on the face of the part I want to make, and create a point and line that is the center/orientation of the text. I'll then run the script which will ask me to select the face, sketch point and orientation line, and then insert the mark feature based on those parameters. Where I'm running into trouble is I can't figure out how to tie the text in the text box to part number directly. When I create the text box manually it has the option to insert iproperties directly from the part, which maintain the link, so if I changed the part number or revision, the mark feature tracks the changes. At this stage the only option I've been able to find is to use a second iLogic rule to create a parameter in the part that holds the part number & revision and then make the text box point to those, but I believe I still need triggers in that second rule to run when iproperties are changed to update the parameters, and it all starts to feel pretty messy. Does anyone have any elegant solutions to this, ideally something along the lines of linking the text box directly to the iproperty?

Kind Regards

 

Roydon Mackay

0 Likes
131 Views
2 Replies
Replies (2)
Message 2 of 3

JelteDeJong
Mentor
Mentor

You might want to have a look at my blog post: "Point, click and mark a part with a part number".

I guess it will do what you want. Maybe you need to change line 4 into something like this:

Dim markText = iProperties.Value("Project", "Part Number") & " - " & iProperties.Value("Project", "Revision Number")

 

Jelte de Jong
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.

EESignature


Blog: hjalte.nl - github.com

Message 3 of 3

mgaunt3DSG
Enthusiast
Enthusiast

Is it possible to have the text be dynamic? The code you have made just uses a string of what the Part Number is when the rule is ran but will not update when the part number is changed. When making a text box manually we can have it use the iProperty itself as shown here.

 

mgaunt3DSG_0-1756391395504.png

 

0 Likes