Automated Scheamtic

Automated Scheamtic

Anonymous
Not applicable
1,965 Views
12 Replies
Message 1 of 13

Automated Scheamtic

Anonymous
Not applicable

I currently export a CSV file from a config file, from which it lets me know what devices I currently have on a network....

 

Cell A = Node ID

Cell B = Line ID

Cell C = Device Address

Cell D = Type

Cell E = Description

 

From this I normally build up a schematic manually, select the block for the device type then change the Node ID, Line ID, and Device Address attributes, N1/L1/001 for example, thousands of times over... 

 

This is easiest the longest document of my projects and I have been looking for an easier solution. 

 

I have limited understanding of python so that was my first avenue, but came up short of anything already out there that I could easily adapt.

 

Is there anything already out there I could try or a different avenue to learn? lisp for example? VB?

 

Ideally I would want a script to automatically generate a line schematic based off my already generated CSV file, 

 

for example

Type 1 places block 1 with attributes in cells A1-C1 in "x" position 100

Draw line 100

Type 1 places block 1 with attributes in cells A2-C2 in "x" position 300

Draw line 100

Type 2 places block 2 with attributes in cells A3-C3 in "x" position 500

0 Likes
1,966 Views
12 Replies
Replies (12)
Message 2 of 13

ronjonp
Mentor
Mentor

Post a sample drawing of your drawing schematic. Reading CSV files is easy peasy 🙂

0 Likes
Message 3 of 13

Anonymous
Not applicable

Changed post re read, if Anthony you made csv from excel could do something directly saves the next, next question link from excel. If so post xls also.

0 Likes
Message 4 of 13

Anonymous
Not applicable

Thanks for the reply.

 

Done a very brief look at the block schematic and a screenshot of an example of the .CSV file that is generated.

 

BLOCK.png

 

CSV FILE.png

0 Likes
Message 5 of 13

ronjonp
Mentor
Mentor

@Anonymous 

The actuals files rather than screen captures would help more.

0 Likes
Message 6 of 13

Anonymous
Not applicable

My Bad...

 

 

0 Likes
Message 7 of 13

ronjonp
Mentor
Mentor

@Anonymous 

This schematic is a bit disjointed with MTEXT and ATTRIBUTES ... why are you not using attributes for all the information?

ronjonp_0-1618409150046.png

 

0 Likes
Message 8 of 13

Anonymous
Not applicable

I just quicker to change the text with the MTEXT, no problem using the ATTRIBUTES though.

0 Likes
Message 9 of 13

ronjonp
Mentor
Mentor

I'll see if I can get to this later today or tomorrow, some real work came in :).

0 Likes
Message 10 of 13

Anonymous
Not applicable

No worries dude, any help, at any point would be much appreciated. 

0 Likes
Message 11 of 13

CodeDing
Mentor
Mentor

@Anonymous ,

 

It looks like you're using Excel to parse XML data perhaps? If that is the case, and you are further interested, I do have a function that parses an XML string to Lisp. Might be useful here. It can also read an excel file.

 

Over here on my ALx Functions post:

https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/autolisp-extended-alx-functions/m-p/...

 

 

Best,

~DD

0 Likes
Message 12 of 13

Anonymous
Not applicable

Go straight to excel as I suggested "next next request", do really need a xls file what happens when pattern is repeated for more than 1 segment ? Looks like a good delimeter to look for. "Loop Devices" as you say may be a xml file again multiple segments.

0 Likes
Message 13 of 13

pbejse
Mentor
Mentor

@Anonymous wrote:

 

for example

Type 1 places block 1 with attributes in cells A1-C1 in "x" position 100

Draw line 100

Type 1 places block 1 with attributes in cells A2-C2 in "x" position 300

Draw line 100

Type 2 places block 2 with attributes in cells A3-C3 in "x" position 500


Looks easy enough, But how did you come up with that sequence? What is the block name, position and distance from this info?

 

#PanelID Loop Address Zone Type Description
1 LA 1 1 WPMCP +0.000m LEVEL
1 LA 2 2 WPMCP +5.000m LEVEL
1 LA 3 1 LPSB +0.000m LEVEL

 

 

0 Likes