From the coordinates inside the blocks to the cogo points

From the coordinates inside the blocks to the cogo points
Hello all
How can I get the coordinates inside the block?
Then cogo points created from it because the block is moving from its place, and its properties cannot be taken
Thanks in advance

xxx
AAAAA 010 010.dwg (961.2 KB)

Hi @hosneyalaa

1 Like

Thank you so much @Kulkul
I have no experience split lists to CREATE a point
Is it possible to complete the solution?
Thank you

MTEST TO COGO POINTS.dyn (46.9 KB)

String.Split node using the “\” character as the splitter. This will pull the N apart from the E values giving you sublists.

String.Split again using the : character as the splitter. This will give you sublists in your sublists for the prefix and the value.

List.LastItem at Level2 keeping the levels (so @@L2) will give you the numbers, but they’ll still be strings. Convert them to numbers and you’ll just have to pull the indexes to create points.

Note that if your prefix has meaning (ie: the N changes to an S) you’ll have to add a few more steps.

You should try what @jacob.small has suggested above and come back here if you hit the wall.

1 Like

@jacob.small @Kulkul
Hello, you have reached this stage, the next step

MTEST TO COGO POINTS 012.dyn (59.2 KB)

1 Like

Welcome
How can I replace the Python Script file?
with nodes
To collect two lists to creating points

# 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')
clr.AddReference('ProtoGeometry')

# 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 *
# Import Dynamo Geometry reference
import Autodesk.DesignScript.Geometry as DS
# The inputs to this node will be stored as a list in the IN variables.
dataEnteringNode = IN

adoc = Application.DocumentManager.MdiActiveDocument
editor = adoc.Editor
robots = IN[0]
colours = IN[1]
index = range(len(robots))

OUT = []
for i in index:
    #OUT.append("Ich bin " + robots[i] + " und " + colours[i])
    OUT.append(DS.Point.ByCoordinates(float(robots[i]),float(colours[i]),float(0)))



MTEST TO COGO POINTS 013 solution01 .dyn (97.6 KB)