Reading Block Properties Values with VB

Experimenter
Experimenter

I am trying to create a script that reads Title Block values.  So far I am only able to get the block names from the dft file, but I cannot pull the variable names and values from the block prope.  Below is my code (my code is Python using the VB objects).  Thanks in advance.

 

 

objDoc = objApp .open('file location.dft')

blocks = objDoc .Blocks
for block in blocks:

     print(block.name)

     if block.name == "TITLE BLOCK":

1 REPLY

Re: Reading Block Properties Values with VB

Experimenter
Experimenter

I found the solution:

 

objBlockOccurrence = sheet.BlockOccurrences.item(1)
for item in objBlockOccurrence.BlockLabelOccurrences:
     print('name: ' + item.name + ' value: ' + item.value)