Community
Inventor Forum
Welcome to Autodesk’s Inventor Forums. Share your knowledge, ask questions, and explore popular Inventor topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Choose Title Block and style standard using msgbox in a trigger

22 REPLIES 22
Reply
Message 1 of 23
fgarcia90
1034 Views, 22 Replies

Choose Title Block and style standard using msgbox in a trigger

Hi,

 

I have a drawing that can be used to manufacturing purpuses or to normal company ipt, iam, etc., and I want to when opening a new drawing configure it if the designer if it chooses yes in the msgbox change the title bock and the standards in the styles.

 

started the code like this:

 

 

Dim i As String
i = MessageBox.Show("Vai efectuar o desenho de uma ferramenta ou de um elemento seu?", "Parts List", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1)

If i = "6" Then
	ActiveSheet.TitleBlock = "Alualpha_Ferr"
End If

 

 

 but it gives this error

The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))

 

 

sorry but I'm a beginer 🙂

 

Thanks in advanced

FG

22 REPLIES 22
Message 21 of 23
SeanFarr
in reply to: fgarcia90

and you have done this in the "edit definition" sketch environment??

 

titleblock3.png

Sean Farr
Product Designer at TESInc.ca

Inventor Professional 2014-Update 2 - AutoCAD Electrical 2014
Win7-x64 | ASUS P8Z77-V | i7 3770 -3.4 GHz | 32GB RAM |
240GB SSD | nVidia GTX 670 4GB - 320.49
Message 22 of 23
fgarcia90
in reply to: SeanFarr

Yes, I will try to add vectorized so he won't have a image file.
Message 23 of 23
Saqib.Iqbal
in reply to: SeanFarr

Great work. That makes my life easy. Thanks for sharing the IDW file.

 


@SeanFarr wrote:

Hi,

 

Instead of a message box pop up, I have a form that pops up once the template drawing is opened.

Use attached image as reference

 

black box shows my title blocks

red box shows my custom styles which controls my drawing units

 

arrow point to rules used.

 

This form allows me to choose

  1. units - this is my drawing standard selection (see rule with green arrow)
  2. choose sheet size (see rule with red arrow)
  3. choose title block, I have 4 different ones, based on size and sub-company (see rule with orange arrow)

and the form is started using the rule with purple arrow

 

 

disregard all company info and logo's

 

Good Luck!!

 

titleblock.png


 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report