The problem:
I want to create native dimension lines. Because VS does not have that node, I made one myself using ExecPythonScript. The problem I get is that it only creates elevation dimensions and I can't force it to create linear dimension.
"
import NemAll_Python_BaseElements as be
import NemAll_Python_BasisElements as bse
import NemAll_Python_Geometry as g
def function_to_execute(a):
dp=bse.DimensionProperties()
p1=g.Point3D(0,0,0)
p2=g.Point3D(0,200,0)
lista=g.Point3DList(p1)
lista.append(p2)
v1=g.Vector2D(0,100)
v2=g.Vector2D(0,100)
cota=bse.DimensionLineElement(lista,v1,v2,dp)
return cota
"
If I try to to force it to be linear dimension as seen in Dimensioning.py by setting:
dim_prop = AllplanBasisElements.DimensionProperties(self.document, bse.Dimensioning.eDimensionLine)
I also tried:
"
dpbase=bse.DimensionProperties()
dp=bse.DimensionProperties(dpbase,bse.Dimensioning.eDimensionLine)
"
to get rid of the self.document part in case that gave the error.
Does anyone have an idea? I want to use native dimensions, not lines and text (I already did the lines and text one,it is not very friendly).