looking for guidance!

looking for guidance!

nicholas.carterB4EKC
Contributor Contributor
2,005 Views
21 Replies
Message 1 of 22

looking for guidance!

nicholas.carterB4EKC
Contributor
Contributor

Hey all,

 

I am looking for guidance / assistance on how to best approach make a script file of some sort to make my current work more automated.  I do not know if it is possible?  I am looking for a way to make these electrical line tags match what address block and terminal number is displayed on the left hand side.  When the address and terminations blocks change I have to go through each tag on the right hand side and type in the values to match.. which is very time consuming.  I would like for them to just automatically update.  Please see attached image for reference.

 

Thanks in advance! 

0 Likes
Accepted solutions (1)
2,006 Views
21 Replies
Replies (21)
Message 2 of 22

Jason.Piercey
Advisor
Advisor

Look into using fields to automate the replication of data.

Message 3 of 22

cadffm
Consultant
Consultant

Hi,

 

>>"I do not know if it is possible?"

There are some workarounds, up to a custom tool (programming).

 

Your picture: Is it simple (M)Text or Attributes on Blockreferences?

 

Solution: Ever heard about FIELD [F1] feature? Try it! Command: FIELD<enter>[F1]

and search for it on YT

 

 

Sample attached.

cadffm_0-1718732127604.png

 

(I edited your error in line 2 and 3 !?)

 

Note: Copy ALL objects in one grey rectangle to create a new one, this way the fields are working as expecting

and they don't refering to another/older  line.

Sebastian

0 Likes
Message 4 of 22

paullimapa
Mentor
Mentor

try attached atvlnk.lsp


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes
Message 5 of 22

carter.nicholas.p
Participant
Participant

@cadffm The point address is a block with the termination blocks in red.  I do not want to have to burst or explode all the block to copy the information out to match.  Would the field command still work in this case?

 

@paullimapa I ran the script but do not think it will work copying the data in the blocks to just mtext.

 

I am open to making the line tags blocks if it is easier to transfer the data from addressing block.  If that makes sense?

0 Likes
Message 6 of 22

paullimapa
Mentor
Mentor

The lisp only works on text and attributes but not mtext


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes
Message 7 of 22

carter.nicholas.p
Participant
Participant

okay I think I may be able to make this script file work!  I will just change all the Mtext to regular text.  This is way faster than what I was doing before.  I appreciate the help!

0 Likes
Message 8 of 22

cadffm
Consultant
Consultant

Hi,

 

>>"Would the field command still work in this case?"

yes, learn more about fields, there are really many ways in which you can use linked values.

 

>>"This is way faster than what I was doing before"

It does 90%  what I did manually for my sample - what you have to do just one time,  onced created - you can copy it.

 

>>"I will just change all the Mtext to regular text. "

What part is Text, you wrote about a block? so I am thinking we are talking about Attributes?

Or is Text on the left, but blockreferences+attributes on the right?

(It's possible to add the MText functionality)

 
 

 

 

Sebastian

0 Likes
Message 9 of 22

nicholas.carterB4EKC
Contributor
Contributor

Hey guys,

 

So I did a little bit more research on both the ATVlink and Fields and at the moment I think ATVlink will be the quickest way in editing all the electrical wire tags.  If I am creating a new drawing from scratch I would set it up with Fields.

 

Now, the problem is with both is that I cant seem to find a .lsp file to "find / delete" the beginning of each of the tags  (see attached photo)

zzzz.jpg

.... For some reason once the .lsp files are ran on them then the regular "find / replace" command does not recognize that the text is even there?  Any clue on how to solve this? 

 

0 Likes
Message 10 of 22

nicholas.carterB4EKC
Contributor
Contributor

Hi All,

 

I recently posted about my search for a .lsp file to speed up the time it took for me to update a ton of electrical wiring tags.  Now that I found a script file (ATVlink) to run on the drawing, the "find / replace" command doesn't even recognize the text is there anymore.  This is obviously because the text was transformed by the script file.  I am essentially looking for a "Find / Delete" .lsp file that can be ran after all the text files on the page are altered by (atvlink, or fields) and pick up the redundant text I want to delete from each wire tag.   (Please see attached photo for reference).

 

Thanks!!!!

0 Likes
Message 11 of 22

paullimapa
Mentor
Mentor

What is the redundant text or in this case the Field value you want to find and then delete?  Also share a sample dwg with these values


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes
Message 12 of 22

pendean
Community Legend
Community Legend

@nicholas.carterB4EKC wrote:

...Now that I found a script file (ATVlink) to run on the drawing...


You'll need to ask the creator of the find for help, if you cannot share it here and we all can use it freely as well: PLUS we will need your DWG file with the issue as well.

0 Likes
Message 13 of 22

nicholas.carterB4EKC
Contributor
Contributor

@paullimapa @pendean 

 

I have attached the DWG file for your review.

 

Here is a basic run down of what I am trying to refine (example in cad in yellow rectangle):

- I would like to bring in a block for the individual wire tags that update based on the point name and addressing but without the prefix of the point name (10060_AM_) and without the prefix of panel number (1231). 

- You will see on the right hand side of the yellow where I did a trial with the (atvlink) command.  I had to make all the mtext tags previosuly there and make them into individual lines of text.  I also tried making the individual lines of text into a block once I space them out correctly but when atvlink was ran on the block text it would copy the name but I had to run regen command to make it populate, then I had to run (R-Fields) command to strip the text in order for me to run (Find/Replace) to remove the prefix the script file pulled from the point name.  Also when I used a block the point name would be over top of the other two fields I needed to copy from system point so it was hard to zoom and and make that happen.

 

-  I also ran the script (FrameText) to make a box around the individual group of text after I was done manipulating them but it was clunky and had to keep resetting the offset distance to (.05).

 

- I am trying to stream line this process so I don't have to click into each wire tag and change vales to match the point name block.

 

used script files are also attached.

 

 

 

 

0 Likes
Message 14 of 22

nicholas.carterB4EKC
Contributor
Contributor

see attached dwg

0 Likes
Message 15 of 22

pendean
Community Legend
Community Legend

thanks for the DWG file @nicholas.carterB4EKC 

 

FIND command does not replace TEXT or MTEXT objects buried inside blocks: it only works on editable ATTRIBUTEs inside blocks.

 

pendean_0-1719519048904.png

 

0 Likes
Message 16 of 22

cadffm
Consultant
Consultant

@pendean wrote:

FIND command does not replace TEXT or MTEXT objects buried inside blocks: it only works on editable ATTRIBUTEs inside blocks.


Small correction, it can and will replace in blocks too!  (yellow marked option)

cadffm_0-1719526677418.png

 

Sebastian

0 Likes
Message 17 of 22

pendean
Community Legend
Community Legend
Thanks for the follow up @cadffm
But that not an option, give it a try with the OP's DWG file, share a video if it works for you.
0 Likes
Message 18 of 22

cadffm
Consultant
Consultant

@pendean wrote:
But that not an option

That's also right. The statement that Find does not work for objects in blocks was wrong.

 

>>", give it a try with the OP's DWG file, share a video if it works for you."

I don't need to try it, I know the answer:

AutoCAD protects the FIELDs, so it is not possible to destroy FIELD by using FIND feature,

iInside or outside a block? doesn't matter.

 

👍

Sebastian

0 Likes
Message 19 of 22

nicholas.carterB4EKC
Contributor
Contributor

Were you all able to evaluate the .dwg and maybe see if there was a more efficient way of performing these task?  Any help would be greatly appreciated.

 

@cadffm @pendean @paullimapa 

0 Likes
Message 20 of 22

cadffm
Consultant
Consultant

>"Any help would be greatly appreciated."

Any? Look back to Post#3 and restructure your drawing the same way my sample is.

This way you don't need to shorten.

 

 

Sebastian

0 Likes