Changing reference object data used by cartridge/titleblock

Changing reference object data used by cartridge/titleblock

sebastien.forman
Advocate Advocate
368 Views
2 Replies
Message 1 of 3

Changing reference object data used by cartridge/titleblock

sebastien.forman
Advocate
Advocate

Hi,

 

I would like to know how can i change reference use for showing information in title block (cartridge).

If I put multiple ipt or iam in document idw, Inventor take always the first part put in idw to set information in cartridge.

But sometime, it’s to late to change this order because development plan is already finished.

For The moment, the solution one is to remove all views except the view we need to see data in cartridge. And re made all other view.

Second solution is to copy and pas all the view from sheet 1 to sheet 2, and delete sheet 1. (Sheet 2 becomes sheet 1).

I would like to know a code track to change this ref.

Thank you for your help.

 

Sébastien

0 Likes
369 Views
2 Replies
Replies (2)
Message 2 of 3

dgreatice
Collaborator
Collaborator

hi,

 

all properties in Title block reference to model properties?

 

I think for dynamic properties, you must use drawing properties, and drawing properties can be reference from selected view to get model properties. example procedure:

 

1 . Title block must set to Custom Drawing Properties.

2. With Command

Dim oView as DrawingView

oView = Thisapplication.Commandmanager.Pick(kDrawingViewFilter, "Select view to get model properties?")

 

3. Get inside to Document

Dim oDoc as Document

oDoc = oView.ReferenceDocumentDescriptor.ReferenceDocument

 

4. Get inside to model Design Tracking PropertySet and Drawing Properties

dim oDD as DrawingDocument

oDD = Thisapplication.ActiveDocument

dim oModelPropSet(1 to 4) as Propertyset

oModelPropSet(1) = oDoc.PropertySets.Item("Design Tracking Properties")

Dim oDwgPropSet(1 to 4) as PropertySet

oDwgPropSet(1) = oDD.PropertySets.Item("Design Tracking Properties")

 

5. Synchronize DrawingProperties property "Description"

Dim oModelProp(1 to 100) as Property

oModelProp = oModelPropset(1).Item("Description")

Dim oDwgProp(1 to 100) as Property

oDwgProp(1) = oDwgPropSet(1).Item("Description")

oDwgProp(1).Value = oModelProp(1).Value

 

if you use copy paste with manually process is easy, but with VBA it will hard code.

 

Please use the ACCEPT AS SOLUTION or KUDOS button if my Idea helped you to solve the problem.

Autodesk Inventor Professional Certified 2014
0 Likes
Message 3 of 3

sebastien.forman
Advocate
Advocate

Hi dgreatice,

Thank you very much for your interest.

Yes, a lot of properties in title block are coming directly from model iproperties.

This is the working of all the Drawings since many years.

It is for this reason that I can’t change this method/structure.

Your code seems to change value by value and not by reference? Is it correct?

(May be That)This method will broke the link with my  ipt or iam, and probably make some problem in future modification (ex: revision, the revision is take in ipt or iam and show in idw revision cell. This is powerful for making a part list of piece with revision in assembly iam).

I really would like to only change reference/link of model and keep the link.

0 Likes