[Back to Blog](/blog) # Teigha PRC: Using OdPrcMarkupLinkedItem

Alex Rumjantsev January 11, 2018 [\#prc](/blog/tag/prc) [\#Example](/blog/tag/example) [\#getting started](/blog/tag/getting-started)

<a class="a2a_button_facebook"></a><a class="a2a_button_twitter"></a><a class="a2a_button_linkedin"></a>

#### What is OdPrcMarkupLinkedItem used for?

OdPrcMarkupLinkedItem is similar to OdPrcReference. As an OdPrcReference, it can be used to override an entity’s location, appearance and linestyle. But unlike OdPrcReference, OdPrcMarkupLinkedItem applies those changes only upon switching views. So every OdPrcView has its own set of OdPrcMarkupLinkedItem items that can change the rendering of entities in the current view.

#### Structure of OdPrcMarkupLinkedItem

OdPrcMarkupLinkedItem is stored in OdPrcProductOcurrence:

```
OdPrcMarkups & OdPrcProductOccurrence::markups();
const OdPrcMarkups & OdPrcProductOccurrence::markups() const;
OdPrcObjectIdArray & OdPrcMarkups::linkedItem();
const OdPrcObjectIdArray & OdPrcMarkups::linkedItem() const;

```

OdPrcView stores links to those OdPrcMarkupLinkedItems:

```
OdPrcObjectIdArray & OdPrcView::linkedItems();
const OdPrcObjectIdArray & OdPrcView::linkedItems() const;

```

OdPrcMarkupLinkedItem has two links.

The first link is to the entity for which graphic parameters are overridden:

```
OdPrcReferenceData & OdPrcMarkupLinkedItem::referenceData();
const OdPrcReferenceData & OdPrcMarkupLinkedItem::referenceData() const;

```

The second link is to the tree subpart that contains this entity: (\*)&lt;&gt;/p

```
OdPrcReferenceData & OdPrcMarkupLinkedItem::referencedProductOccurrence();
const OdPrcReferenceData & OdPrcMarkupLinkedItem::referencedProductOccurrence() const;

```

A new coordinate system for an entity is taken from:

```
OdPrcObjectId & OdPrcMarkupLinkedItem::localCoordinateSystem();
const OdPrcObjectId & OdPrcMarkupLinkedItem::localCoordinateSystem() const;

```

New graphics parameters for an entity are taken from: (\*\*)

```
OdPrcGraphics & OdPrcMarkupLinkedItem::graphics();
const OdPrcGraphics & OdPrcMarkupLinkedItem::graphics() const;

```

(\*) Currently the second link does not influence entity rendering; the implementation is more similar to Tech Soft 3D HOOPS® than Adobe®.

(\*\*) For OdPrcMarkupLinkedItem, Adobe ignores all behavior bits of OdPrcGraphics except PRC\_GRAPHICS\_Show, so it doesn’t take into account Son/Father inheritance or PRC\_GRAPHICS\_Removed. This is why we implemented it similar to HOOPS: OdPrcMarkupLinkedItem works similar to OdPrcGraphics.

#### Example of OdPrcMarkupLinkedItem influence

This is the default view of a file:

![image1](/files/inline-images/pic_1.png)The next picture shows the structure of the OdPrcView to which we are switching. You can see a list of OdPrcMakrupLinkedItem items in OdPrcView (283). Also you can see OdPrcMakrupLinkedItem (24A) which overrides entity OdPrcProductOccurrence (50), so for this view entity we will have:

- OdPrcCategory1LineStyle (298) as its linestyle.
- OdPrcCoordinateSystem (24B) as its location.
- (11 == PRC\_GRAPHICS\_Show | PRC\_GRAPHICS\_SonHeritShow | PRC\_GRAPHICS\_SonHeritColor) as its behavior\_bit\_fields.

![image2](/files/inline-images/pic_2_1.png)This is the same file but switched to another view:

![image3](/files/inline-images/pic_3.png)

## Get started today

**Try ODA software free for 60 days.  
No risk, no credit card required.**

[Try for Free](https://www.opendesign.com/free-trial)
