Modify blockreference Z value

Hello everyone,

I would like to modify blockreferences Z value, the idea would be to get the value of an attribute called “ALT” and modify the insertion point Z value.
Do you think of an easy way to do this without using object.transform node?

Thanks a lot

Hello bertrand,
you can fillter out your Blockreferences and find the insert points of the blocks, then you can modify the Z value and then Object.Transform.

TRY



# Load the Python Standard and DesignScript Libraries
import sys
import clr

# Add Assemblies for AutoCAD and Civil3D
clr.AddReference('AcMgd')
clr.AddReference('AcCoreMgd')
clr.AddReference('AcDbMgd')
clr.AddReference('AecBaseMgd')
clr.AddReference('AecPropDataMgd')
clr.AddReference('AeccDbMgd')

# Import references from AutoCAD
from Autodesk.AutoCAD.Runtime import *
from Autodesk.AutoCAD.ApplicationServices import *
from Autodesk.AutoCAD.EditorInput import *
from Autodesk.AutoCAD.DatabaseServices import *
from Autodesk.AutoCAD.Geometry import *

# Import references from Civil3D
from Autodesk.Civil.ApplicationServices import *
from Autodesk.Civil.DatabaseServices import *

adoc = Application.DocumentManager.MdiActiveDocument
editor = adoc.Editor

	
OUT = Point3d(IN[0].X, IN[0].Y, IN[0].Z + IN[1])


1 Like