Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations MintJulep on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

NX11 - Journal Code to leave function open?

Status
Not open for further replies.

Kenja824

Automotive
Nov 5, 2014
949
Objective = Need to go into preference object and change the line type to dash, line thickness to .7, then open the Rectangle function. (Not the sketch rectangle)


I recorded a journal and it does the job of changing the line attributes, but it doesnt open the rectangle function. If it does open it, it is closing it again before the journal ends. But I need the rectangle function to open and be left open so the operator can select the two points for creating the rectangle.


------------


The ultimate would be for the journal to change the preferences for the line attributes, open the rectangle function, then wait for the operator to select the two points to create the rectangle and after the second point is selected, it would automatically go back and change the preferences back to solid line and .18 thick.

This seemed like a much more difficult task so I figured just ending the journal after opening the rectangle function would do. I already have a button they can hit that would return the attributes back to the standard settings.
 
Replies continue below

Recommended for you

Unfortunately, journals do not work with native dialogs in this way; they cannot set a few preferences and leave the dialog open for further interactive input. However, the API does provide some interactive commands. It should be possible to set your preferences, then prompt the user to select 2 points (or screen positions, depending on the application), create the rectangle, and reset the preferences. Either you won't get the normal "rectangle" dialog box or you will have to build a facsimile with the blockstyler application.

www.nxjournaling.com
 
Cool. At least I know what direction to take instead of playing with this for a couple days for nothing. lol

It wouldnt even matter if the dialogue box doesnt show up. For what this is for, they would just need to select two "cursor" points on the drafting screen. Though I guess it would be best if there was a small message saying to select two points. Otherwords they wouldnt know if the function did anything or not I think. lol

I have some journals that used operator input in the middle. Might be beyond my abilities to manipulate these but worth a try. lol
 
Wonderful. lol Nothing like looking for an answer to a problem and finding an old post of your own asking the same question 2 years earlier that never got answered then either. lol
 
If you are working on a drawing sheet, the specifyScreenPosition function should work well. There is an article here about overlay graphics, but it makes use of the specifyScreenPosition function. With the overlay graphics and some work, you could probably show the user a rubber-banding rectangle preview between the first and second pick.

www.nxjournaling.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor