Adding sheet size in custom property

Adding sheet size in custom property

thomas.vanhaecke
Contributor Contributor
2,273 Views
12 Replies
Message 1 of 13

Adding sheet size in custom property

thomas.vanhaecke
Contributor
Contributor

Hello,

 

I'm rather new with this program.

I would like to add the sheet size off the used sheet to my custom property.

Now I have to manually add this to my title block.

It would be a great help if this would be automaticly changed.

 

Could someone help me with this problem?

 

 

0 Likes
Accepted solutions (2)
2,274 Views
12 Replies
Replies (12)
Message 2 of 13

mcgyvr
Consultant
Consultant

To have the sheet size automatically populated in the title block simply edit your title block and add the <Sheet Size> property where you want it to show.. No need to push it to a custom iproperty first. 

SheetSize.PNG



-------------------------------------------------------------------------------------------
Inventor 2023 - Dell Precision 5570

Did you find this reply helpful ? If so please use the Accept Solution button below.
Maybe buy me a beer through Venmo @mcgyvr1269
Message 3 of 13

thomas.vanhaecke
Contributor
Contributor

Hi,

 

Thanks for the fast answer.

But is the client we work for wants my drawings if I'm finnished with them.

Afterworks they upload these drawings into there system?

They have put standard topics into there title blocks that we may not change.

I we change the name the will have problems uploading the drawings.

 

For example the sheet size is cald "GEN-TITLE-SIZ"

If I can't change the name, so I thought maybe there is a way I can link this name to my Iproperty.

Then the name "GEN-TITLE-SIZ" does not have to change.

Message 4 of 13

mcgyvr
Consultant
Consultant
Accepted solution

Ok.. Here is ilogic code to create a custom iproperty named "GEN-TITLE-SIZ" and sets its value to the Active Sheet Size

 

iProperties.Value("Custom", "GEN-TITLE-SIZ") = ActiveSheet.Size


-------------------------------------------------------------------------------------------
Inventor 2023 - Dell Precision 5570

Did you find this reply helpful ? If so please use the Accept Solution button below.
Maybe buy me a beer through Venmo @mcgyvr1269
Message 5 of 13

thomas.vanhaecke
Contributor
Contributor

Thank you,

 

This worked great for me.

 

I have another question if I may ask this here.

I have to get the partnumber and the discription of the 3D part als in this title block.

There is probebly a simple solution for this also.

Can you maybe help me with this also.

 

Many thanks

0 Likes
Message 6 of 13

mcgyvr
Consultant
Consultant

@thomas.vanhaecke wrote:

I have another question if I may ask this here.

I have to get the partnumber and the discription of the 3D part als in this title block.

There is probebly a simple solution for this also.

Can you maybe help me with this also.

 

Many thanks


Sure...

Do you want/need to use a custom iproperty again or can you just insert that into text like I originally showed..

partdesc.PNG

 

You can also copy model iproperties to the drawing iproperties via tools..document settings..Drawing tab in the section at the bottom "Copy Model iproperty Settings..." button



-------------------------------------------------------------------------------------------
Inventor 2023 - Dell Precision 5570

Did you find this reply helpful ? If so please use the Accept Solution button below.
Maybe buy me a beer through Venmo @mcgyvr1269
0 Likes
Message 7 of 13

thomas.vanhaecke
Contributor
Contributor

We need to use Custom Iproperty again.

 

For the Partnumber this has to be custom Iproperty "TITEL5"

For the Discripton this has to be custom Iproperty "TITEL6"

0 Likes
Message 8 of 13

mcgyvr
Consultant
Consultant
Accepted solution

@thomas.vanhaecke wrote:

We need to use Custom Iproperty again.

 

For the Partnumber this has to be custom Iproperty "TITEL5"

For the Discripton this has to be custom Iproperty "TITEL6"


If ThisDrawing.ModelDocument IsNot Nothing Then
Mdoc = ThisDrawing.ModelDocument
Else
MessageBox.Show("This drawing has no model reference", "iLogic")
Return
End If


iProperties.Value("Custom", "TITEL5") = Mdoc.PropertySets.Item("Design Tracking Properties").Item("Part Number").Value
iProperties.Value("Custom", "TITEL6") = Mdoc.PropertySets.Item("Design Tracking Properties").Item("Description").Value

 



-------------------------------------------------------------------------------------------
Inventor 2023 - Dell Precision 5570

Did you find this reply helpful ? If so please use the Accept Solution button below.
Maybe buy me a beer through Venmo @mcgyvr1269
Message 9 of 13

thomas.vanhaecke
Contributor
Contributor

Thanks for the help,
this works perfectly 😉

 

0 Likes
Message 10 of 13

thomas.vanhaecke
Contributor
Contributor

Hi,

I've encouterd to another problem.

If I make a idw-file with more then one sheets, all the previous solutions (scale, sheet size, part number and discription) only work for the first sheet.

If I make a second sheet with another part, the program uses the data from the first sheet.

 

Is there maybe a way to make sure that for every sheet this is different?

 

 

0 Likes
Message 11 of 13

mcgyvr
Consultant
Consultant

@thomas.vanhaecke wrote:

Hi,

I've encouterd to another problem.

If I make a idw-file with more then one sheets, all the previous solutions (scale, sheet size, part number and discription) only work for the first sheet.

If I make a second sheet with another part, the program uses the data from the first sheet.

 

Is there maybe a way to make sure that for every sheet this is different?

 

 


There are potentially ways to address this.

How will you handle the multiple custom parameters required? If so..

Drawing custom parameters are per document and not per sheet..

 

If your sheet one title block is automatically pulling its data from the "GEN-TITLE-SIZ" property what is sheet 2 going to use? Is each sheet going to have a different title block? "GEN-TITLE-SIZ PAGE 1"? "GEN-TITLE-SIZ PAGE 2"?,etc...

 

You need to provide exactly how each and every page and each potential custom iprop associated with each page will be handled.. Then we can surely suggest a method to achieve what you want or provide alternative suggestions.

 

I'm also not sure what you have done with the code snippits I have provided.. They can be utilized in different ways..

 

Please provide more detail and even examples of your drawing and how you have implemented the code segments I have provided.. 

 

The devil is always in the details.. 



-------------------------------------------------------------------------------------------
Inventor 2023 - Dell Precision 5570

Did you find this reply helpful ? If so please use the Accept Solution button below.
Maybe buy me a beer through Venmo @mcgyvr1269
0 Likes
Message 12 of 13

thomas.vanhaecke
Contributor
Contributor

Each sheet should have a different title block.

For example: Sheet one has a drawing of one part and sheet two has a drawing of another part.

So these 2 drawings are different part, so the title block is going to be different also.

There wille be used a different, scale and sheet size.

Also the partnumber and the discription will be different.

 

The code snippits that you have provided I have implemented into "Add Rule"

Then for all these rules I have put them into an "Event Trigger" "After Save Document"

 

I have put an idw-file in attachement with 2 sheet in it.

I have made the drawings so that they have a different scale, sheet size, partnumber (TITEL5) and discription (TITEL6)

In the png-file you can see were these rules appear.

If you look at the second sheet of the idw-file you see that this data is the same as the first sheet.

The outcome for the second sheet should be as following.

- Scale = 1 : 1,5

- Sheet Size = A1

- TITEL5 = Actum-ST-NEW-001-V15-V16-49

- TITEL6 = UPN 100 - 1000

 

In Iproperty you can see that there a few custom property's.

It's only for these 4 items that i want a automatic solution, the rest is for every page the same.

0 Likes
Message 13 of 13

thomas.vanhaecke
Contributor
Contributor

Hi,

 

Do you maybe need moren info from me to make a solution for the last problem?

It would be great if this was solved to.

 

Many thanks

0 Likes