I need a solution.
I am trying to develop an application with the dxf-parser library. When adding a dynamic block in AutoCAD, it anonymizes the name. (*U..., *D..., etc.) When I pull the Dynamic Blocks to the table;
---------
Block Name(Visibility States) || Usage Count
*U2(*U2) || 1
---------
It is visible. So I want to pull the actual names and Visibility States of the Dynamic blocks;
---------
Block Name(Visibility States) || Usage Count
WINDOW(P 170/230) || 1
---------
Like this. Thank you for your help.
`
<tbody className="bg-white dark:bg-gray-900 divide-y divide-gray-200 dark:divide-gray-800">
{blocks.map((block, index) => {
console.log('Block data:', {
name: block.name,
dynamicProperties: block.dynamicProperties,
rawBlock: block
});
return (
<tr key={index}>
<td className="px-6 py-4 whitespace-nowrap text-sm font-medium">
{block.originalName || block.baseBlock ? (
<>
<span>{block.originalName || block.baseBlock}</span>
{block.visibilityStates && block.visibilityStates.length > 0 && (
<span className="text-blue-500 text-xs ml-2">
({block.visibilityStates.join(', ')})
</span>
)}
<span className="text-gray-500 text-xs ml-2">
({block.anonymousName || block.name})
</span>
</>
) : (
block.name
)}
</td>
<td className="px-6 py-4 whitespace-nowrap text-sm">{block.count}</td>
</tr>
);
})}
</tbody>
`