<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to highlight a line in a Block(reference)? in ObjectARX Forum</title>
    <link>https://forums.autodesk.com/t5/objectarx-forum/how-to-highlight-a-line-in-a-block-reference/m-p/6659186#M9428</link>
    <description>&lt;P&gt;I can reproduce this issue in AutoCAD 2016 with all updates:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2016-11-01_9-06-40.png" style="width: 705px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/288085iF8515385ED06AC1F/image-size/large?v=v2&amp;amp;px=999" role="button" title="2016-11-01_9-06-40.png" alt="2016-11-01_9-06-40.png" /&gt;&lt;/span&gt;﻿&lt;/P&gt;</description>
    <pubDate>Tue, 01 Nov 2016 07:08:33 GMT</pubDate>
    <dc:creator>Alexander.Rivilis</dc:creator>
    <dc:date>2016-11-01T07:08:33Z</dc:date>
    <item>
      <title>How to highlight a line in a Block(reference)?</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/how-to-highlight-a-line-in-a-block-reference/m-p/6650532#M9425</link>
      <description>&lt;P&gt;There is a block which contains AcDbLines.&lt;BR /&gt;This block is used via a single BRef.&lt;BR /&gt;How do I highlight a line? Obviously this function must be called:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Acad::ErrorStatus AcDbEntity::highlight(const AcDbFullSubentPath&amp;amp; subId = kNullSubent, ...&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As the object of which highlight is called, I tried both the BRef and the AcDbLine.&lt;BR /&gt;As the first parameter I tried both kNullSubent and a subent that I created like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;AcDbFullSubentPath oMyPath;
AcDbObjectIdArray &amp;amp;rObjIds = oMyPath.objectIds();
rObjIds.append(idOfBlockOfBRef); // idBtr2idBRef(idBtr));
rObjIds.append(pEnt-&amp;gt;objectId());
AcDbSubentId &amp;amp;rSubentId = oMyPath.subentId();
rSubentId.setType(kEdgeSubentType);


&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I also tried it without the last two lines.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The results:&lt;/P&gt;&lt;P&gt;BRef + oMyPath: eInvalidInput&lt;BR /&gt;BRef + kNullSubent: Complete "Bref" (iow complete block at the correct location) is highlighted.&lt;BR /&gt;Line + oMyPath: eInvalidInput&lt;BR /&gt;Line + kNullSubent + any mode other than 2D wireframe: Line is highlighted as if the block(ref) would be positioned at 0,0,0&lt;BR /&gt;Line + kNullSubent + 2D wireframe: No error result, no visual effect.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, nothing is like I want (only the single line highlighted at the correct position)&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Oct 2016 15:47:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/how-to-highlight-a-line-in-a-block-reference/m-p/6650532#M9425</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-10-27T15:47:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to highlight a line in a Block(reference)?</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/how-to-highlight-a-line-in-a-block-reference/m-p/6651137#M9426</link>
      <description>&lt;P&gt;Here is a quick sample I have written to get line entities in a block reference and highlight them :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;void TestLine()
{
	AcDbBlockTable* pTable; 
	acdbHostApplicationServices()-&amp;gt;workingDatabase()-&amp;gt;getBlockTable
		(
		pTable,
		AcDb::kForRead
		);
	if(pTable == NULL)
		return; 

	AcDbBlockTableIterator* pTableIter;
	for( pTable-&amp;gt;newIterator(pTableIter); !pTableIter-&amp;gt;done(); pTableIter-&amp;gt;step())
	{     
		AcDbBlockTableRecord* pRecord;     
		pTableIter-&amp;gt;getRecord(pRecord,AcDb::kForRead);  
		if(pRecord == NULL)
		{   
			acutPrintf(_T("\nCannot open a BTR"));  
			continue;   
		} 

		AcDbBlockTableRecordIterator* pRecordIter;
		for (    pRecord-&amp;gt;newIterator(pRecordIter);
			! pRecordIter-&amp;gt;done();
			pRecordIter-&amp;gt;step()
			)
		{
			AcDbEntity*pEnt;    &lt;BR /&gt;                        const AcDbFullSubentPath subentIds; 
			pRecordIter-&amp;gt;getEntity(pEnt, AcDb::kForRead);
			AcDbLine *pLine = NULL;
			pLine = AcDbLine::cast( pEnt );
			if ( pLine)
			{
				pEnt-&amp;gt;subentPtr(subentIds);
				pEnt-&amp;gt;highlight(subentIds);
				pEnt-&amp;gt;close();
			}

		}   
		delete pRecordIter;   
		pRecord-&amp;gt;close(); 
	}  
	pTable-&amp;gt;close();
	delete pTableIter;
}&lt;/PRE&gt;</description>
      <pubDate>Thu, 27 Oct 2016 18:30:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/how-to-highlight-a-line-in-a-block-reference/m-p/6651137#M9426</guid>
      <dc:creator>deepak.a.s.nadig</dc:creator>
      <dc:date>2016-10-27T18:30:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to highlight a line in a Block(reference)?</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/how-to-highlight-a-line-in-a-block-reference/m-p/6653488#M9427</link>
      <description>&lt;P&gt;Thank you very much.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;On my computer your code leads to the same behaviour as mine (highlights a "ghost block at 0,0,0" when visual style is not 2D wireframe). I have to say I am using ACAD 2106.&lt;/P&gt;
&lt;P&gt;I found out my boss has Acad 2017 installed and there is no "ghosting" on his computer. Do you know whether this a known bug in ACAD2016?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Bye bye,&lt;/P&gt;
&lt;P&gt;Wolfram Kuss,&lt;/P&gt;
&lt;P&gt;imos3d.com&lt;/P&gt;</description>
      <pubDate>Fri, 28 Oct 2016 14:58:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/how-to-highlight-a-line-in-a-block-reference/m-p/6653488#M9427</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-10-28T14:58:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to highlight a line in a Block(reference)?</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/how-to-highlight-a-line-in-a-block-reference/m-p/6659186#M9428</link>
      <description>&lt;P&gt;I can reproduce this issue in AutoCAD 2016 with all updates:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2016-11-01_9-06-40.png" style="width: 705px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/288085iF8515385ED06AC1F/image-size/large?v=v2&amp;amp;px=999" role="button" title="2016-11-01_9-06-40.png" alt="2016-11-01_9-06-40.png" /&gt;&lt;/span&gt;﻿&lt;/P&gt;</description>
      <pubDate>Tue, 01 Nov 2016 07:08:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/how-to-highlight-a-line-in-a-block-reference/m-p/6659186#M9428</guid>
      <dc:creator>Alexander.Rivilis</dc:creator>
      <dc:date>2016-11-01T07:08:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to highlight a line in a Block(reference)?</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/how-to-highlight-a-line-in-a-block-reference/m-p/13230056#M9429</link>
      <description>&lt;P&gt;it not work in autocad2020&lt;/P&gt;</description>
      <pubDate>Thu, 26 Dec 2024 02:48:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/how-to-highlight-a-line-in-a-block-reference/m-p/13230056#M9429</guid>
      <dc:creator>66713205</dc:creator>
      <dc:date>2024-12-26T02:48:59Z</dc:date>
    </item>
  </channel>
</rss>

