Submitted by ian.eldred on Wed, 03/11/2015 - 06:25
Forums:
Hi,
I am writing a journal to allow users to create a BOM balloon that is automatically populated with the correct find number. I know this functionality exists with parts lists, but we use TeamCenter and do not want parts lists on our drawings (even placing them off the page has been ruled out!).
I can manually create a balloon that is linked to the find number of the component by adding an identification symbol, editing the text and changing the category to 'Relationships' and clicking the 'Insert Object Attribute' button and then selecting my component. This produces text such as <W!47198@CALLOUT>.
My question is: Where does the number 47198 come from in that text? And can I find out that number from within my journal?
Cheers,
Ian

re: component ID
I'd guess that is the ID of the component. Run the following code on a component to see if the ID numbers match (code written by Amy Webster of GTAC).
Oh, and be aware that this all changes in NX 8 or higher.
http://community.plm.automation.siemens.com/t5/NX-Languages/Reading-Text...
Attaching leaders
Hi,
Thanks for hint about the handles. It wasn't what was needed, but it pointed me in the right direction. The number is actually the component Tag. I've used it in the code below, which allows the user to select an edge, then finds the component or subassembly and correctly populates a callout balloon.
The bit that I'm stuck on is attaching the leader to the geometry on the view. The arrow always ends up in the bottom left of the drawing, not attached to anything. If you have any advice on this front, it would be greatly appreciated.
Cheers,
Ian
re: ID symbol leader
The picked point is reported with respect to 3D model space; the leader point is being specified in terms of the 2D drawing sheet space. You will need to convert from the drawing view coordinates to the drawing sheet coordinates.
You might try the .MapModelToDrawing method.
Also, you might want to look at:
http://nxjournaling.com/content/move-parts-list-callout-leader-location
This journal allows the user to select an edge in the drawing and attach the callout balloon to the selected edge.
re: ID symbol leader
Thank you for that. The .MapModelToDrawing method looks like it could work for me. This method requires me to provide a view, so how do I identify the view that the user has clicked on (without asking them to select a view with a separate click)?
re: select point and view
In the code linked to above, the .SelectWithSingleDialog method was used, which will return the point and the view selected.
re: ID symbol leader
I've just reviewed your parts list leader link above and I think that answers my question using the .SelectWithSingleDialog method. I'll give that a try with the .MapModelToDrawing method and see if I can get it to work. Either way, I'll post back here and let you know. Thanks again!
re: BOM balloons without a parts list
I now have this working pretty much as intended. See code below, much of the which was taken from: http://nxjournaling.com/content/move-parts-list-callout-leader-location.
As ever, thank you very much for your help!
BOM balloons without parts list
This is absolutely brilliant. However, with the DraftingCurve introduction in later versions of NX this does not seem to work anymore. The only thing I could get it to work on was pre-nx8 views on the silhouette curves. This would be a god send if it worked for NX8.5+.
The DraftingCurve.OwningPart gives the actual drawing sheet and the OwningComponent gives a null tag.
Re: BOM balloons without parts list
I only have access to NX7.5 at the moment. We are due to upgrade to NX10 later this year. In the meantime, I'd be happy to work on it with you if you can test it.
Hi guys! Any news about this
Hi guys! Any news about this with nx9 or later?
Re: BOM balloons without parts list
I now have access to NX10, so I should be able to work on this again. I'll let you know when I make some progress.
Have you been able to update
Have you been able to update it to make it work in NX10?
thanks!I´ve been looking for
thanks!I´ve been looking for this for long. I´m cluless about programming, so I can´t do nothing but ask whoever it takes (because the way it works now is not proficient...).
Would it be possible tu update this code for NX11?
Hello,
I find this utility very interesting and very useful!
However, I use NX11 and it does not seem to work on this version. That is true ?
Would it be possible to update this code to work with NX11?
Best Regards !
Pat
Balloon with Part List ???????
Hello,
It's possible to create a smart balloon without any part-list. Let me explain, I would like to create a balloon manually attached to a component (edge or surface) and the number displayed in the balloon must match the callout attribute of the coin it is associated with? I wish to be able to insert more than one balloon for the same component if it is found in several copies in an assembly. Unless I'm wrong, it's not possible to do that in NX11 and NX12, you have to manually enter the balloon number if you have more than one balloon with the same number, but I would like do not have to manually enter the number in the ball.
In addition, could the number displayed in the balloon can be automatically updated if Callout changes?
It's possible to do this with the previous examples? If so, how can you help me?
Best!
Pat