Inventor Customization

Posts: 232
Registered: ‎08-11-2004
Message 1 of 3 (212 Views)
Accepted Solution

(VBA) Write multiple Prompted Entry Fields in one pass?

212 Views, 2 Replies
10-17-2013 01:27 PM

Is it possible to write multiple prompted entry fields down in a single pass? As it is now, you can see the taskbar reporting as it writes down each line.


Essentially i've got 6 different fields i'm trying to write down using code like shown below:


If oTB.GetResultText(oTitleBox1) <> Me.Title1.Value Then
    Call ThisApplication.ActiveDocument.ActiveSheet.TitleBlock.SetPromptResultText(oTitleBox1, Title1.Value)
End If

If oTB.GetResultText(oTitleBox2) <> Me.Title2.Value Then
    Call oTB.SetPromptResultText(oTitleBox2, Title2.Value)
End If

 Just wondering if there's a way it can be written down in a single pass to save time or if it's a limitation of prompted entry text.

ADN Support Specialist
Posts: 300
Registered: ‎07-21-2006
Message 2 of 3 (199 Views)

Re: (VBA) Write multiple Prompted Entry Fields in one pass?

10-17-2013 04:32 PM in reply to: mslosar

It's not currently possible to set mulitple prompted entry fields in a single call.

Brian Ekins
Developer Technical Services
Autodesk Developer Network
Autodesk, Inc.
Posts: 232
Registered: ‎08-11-2004
Message 3 of 3 (187 Views)

Re: (VBA) Write multiple Prompted Entry Fields in one pass?

10-18-2013 09:24 AM in reply to: ekinsb

That's what I thought - thanks :smileyhappy:


Keep it in mind for future builds though. People use lots of prompted fields and a single write operation would be nice.



FWIW, i ran into an odd situation with this yesterday.


The macro i'm writing basically looks at an idw and indexes the drawing information (title lines, drawing number, revision, etc) for all sheets in the idw. Each sheet is displayed in a dialog box in it's own individual tab. I went to sheet 2 in the idw and ran the macro. In the dialog I went to the sheet 2 tab to edit the info. Made changes, hit apply, everything worked fine. While still in the dialog, i went to sheet 3's tab and made changes. When i hit apply it instantly finished. There was no delay at all. It was so quick i thought it did nothing. I exited the dialog and then manually went to sheet 3 and looked at the titleblock. No changes. Seemed like it didn't work. However, i went to the browser and clicked 'edit field info' under the titleblock and lo and behold all the changes were in there. Problem was, clicking OK didn't update the sheet - neither did hitting update sheets on the manage tab. Nothing would make the info from the field text dialog update to the sheet.


My solution was to go back into the 'Apply' code and add a .update event to the drawing. Upon running the macro the write delay where you could see the taskbar making each write operation ran regardless of what sheet i was on (which is what i'd have expected).


That's kind of a long winded explanation to ask - is it the update operation what causes the delay on the prompted text and not the actual assigning of the information? Assigning the info seemed to be instant, but to get it to display in the titleblock seemed to require separate individual operations per field. Is that a fair understanding?

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community

Inventor Exchange Apps

Created by the community for the community, Autodesk Exchange Apps for Autodesk Inventor helps you achieve greater speed, accuracy, and automation from concept to manufacturing.

Connect with Inventor