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!

Annotation Preferences > Fit Methods > change or set via NXOpen (vb.net)

Status
Not open for further replies.

lklo

Industrial
Nov 24, 2010
226
Hi -

Does someone here know if it is possible to set or change the fit method programmatically in Annotation Preferences > tab "Fit Methods"
In NX drafting application..
In some of our NX drawing files , "Auto Size Column" is ticked...
But I need to be able to untick this pref > pleas see attached pics..
Do some of you guys know if I can set the part preference, so this is unticked...
I use vb.net in my app's....

lklo
 
 http://files.engineering.com/getfile.aspx?folder=9a5fd394-8095-4be4-add7-948f9c77f259&file=Annotation_Pref.FitMethod.zip
Replies continue below

Recommended for you

Cowski - thanks again for your reply.

I already use the fit_methods() in my tabNotes in my program.
I use it for changing some indvidual cell's, when editing/creatin cells in program...

But I also need to change the default FitMethod preferences in the current drawing part,in the start of the program.
I found out to use this:
Code:
        Dim lkl_cell_prefs As UFTabnot.CellPrefs
        ufs.Tabnot.AskDefaultCellPrefs(lkl_cell_prefs)
        lkl_cell_prefs.nm_fit_methods = 4
        lkl_cell_prefs.fit_methods(0) = UFTabnot.FitMethod.FitMethodAutoSizeRow
        lkl_cell_prefs.fit_methods(1) = UFTabnot.FitMethod.FitMethodAutoSizeCol
        lkl_cell_prefs.fit_methods(2) = UFTabnot.FitMethod.FitMethodTruncate
        lkl_cell_prefs.fit_methods(3) = UFTabnot.FitMethod.FitMethodAutoSizeText
        ufs.Tabnot.SetDefaultCellPrefs(lkl_cell_prefs)

works very well....
I also ask for restore_cell_prefs...(not seen in below code)
Then in the end of program, I restore the FitMethod preferences to the Initial preferences...

(I have a really nice video I would like to share, but seems like it's not possible to upload videos here on the site)

lklo


 
 http://files.engineering.com/getfile.aspx?folder=5f85e408-8ceb-4fb3-b186-ef6ae163858f&file=tabNoteCreateAndUpdate_onTheFly.png
Status
Not open for further replies.

Part and Inventory Search

Sponsor