Update dynamic block visibility state via excel input

Update dynamic block visibility state via excel input

fkp7057
Advocate Advocate
5,221 Views
30 Replies
Message 1 of 31

Update dynamic block visibility state via excel input

fkp7057
Advocate
Advocate

Hi all,

 

here i need your little help.. to complete my work..
in my drawing i have 100+ block that block have same name, only i have to change its visibility state.
i have excel file as input for that visibility state now i want to update that block visibility using excel/lisp/script file or other easy way.. bcoz i am using lookup table to achieve the visibility

 

Regards,

FKP

0 Likes
Accepted solutions (2)
5,222 Views
30 Replies
Replies (30)
Message 2 of 31

pbejse
Mentor
Mentor

@fkp7057 wrote:

..in my drawing i have 100+ block that block have same name, only i have to change its visibility state.
i have excel file as input for that visibility state now i want to update that block visibility using excel/lisp/script file or other easy way..


 

Post a sample, drawing and excel sheet format. if the block(s) have the same name, how would program know which of the 100+ blocks would be updated?

 

 

0 Likes
Message 3 of 31

fkp7057
Advocate
Advocate

The block can be identify by their Handle ID...

 i have attached block file where i want to use this table..

 
 

Table.PNG

 

0 Likes
Message 4 of 31

pbejse
Mentor
Mentor

@fkp7057 wrote:

The block can be identify by their Handle ID...

 i have attached block file where i want to use this table..


Really @fkp7057 , thats the sample table we are going to work on? 🙂

Is that csv, xls? xlsm?  just two columns?  if not, what else do you have for the other columns? where is the file normally saved? same folder as the drawing? or you wanted to be prompted to select the source file?

 

Help us , help you.

 

pBe

 

 

 

 

 

 

 
0 Likes
Message 5 of 31

fkp7057
Advocate
Advocate

Let me clear the thing what exactly I want...

I have created dynamic block for electrical single line diagram with attributes,formulas, lookup table and visibility..

So what evers attributes in block that I want to update using execell (Right now using attout and attin command to update attributes) .

Now only I have to upadate that feeder type for that right now using viability control through lookup table.. 

I want that visibility control using any external file...

I.e: Excell, CSV, TXT, or what ever format....

 

0 Likes
Message 6 of 31

pbejse
Mentor
Mentor

@fkp7057 wrote:

I.e: Excell, CSV, TXT, or what ever format....


Ok, hang on....

 

0 Likes
Message 7 of 31

pbejse
Mentor
Mentor
Accepted solution

@fkp7057 wrote:

I want that visibility control using any external file...


in CSV format:

 

::---------------------------------------------------------::
::     VOTF to Write to file | VIFF for READ from file     ::
::---------------------------------------------------------::

To write the data to a file: [ Visibility Out To File ]

command: VOTF

return: Open the csv file in Notepad

 

To read the file and apply to blocks if match is found [ Visibility In From File ]

command: VIFF 

 

 

HTH

 

Curious how would you change the visibility values on the csv file.

 

Message 8 of 31

fkp7057
Advocate
Advocate

Thank you very much for your efforts...

I'll test it tomorrow morning 10 am IST and I'll give you update....

0 Likes
Message 9 of 31

fkp7057
Advocate
Advocate

That's exactly what i want to do....🙏😀

that's work perfectly for me..

really appreciated your effort..

Keep helping....

Thank you very much.... 

0 Likes
Message 10 of 31

pbejse
Mentor
Mentor

@fkp7057 wrote:

...

Thank you very much.... 


Good to know, glad i was able to help 🙂 

 

cheers

Message 11 of 31

fkp7057
Advocate
Advocate

@pbejse 

I want little modification on that lsp.. to perform below task if possible...

  1. Right now its extracting-updating visibility through that csv file.. now i want to extract some of the attributes along with visibility status.
  2. when i update this visibility status these attributes parameter also need to be update at same time...
  3. Name of attributes are :
    1. FEEDER-KW
    2. BREAKER-RATING
    3. BREAKER-TYPE
    4. BREAKER-RELEASE
    5. CONTACTOR/VFD/SS-RATING
    6. LDS-RATING
    7. LOAD-DETAIL
    8. NO.OF_POLE
    9. VISIBILITY_STATUS

Your reply will be highly appreciated....

 

0 Likes
Message 12 of 31

pbejse
Mentor
Mentor

@fkp7057 wrote:

@pbejse 

I want little modification on that lsp.. to perform below task if possible...

  1. Right now its extracting-updating visibility through that csv file.. now i want to extract some of the attributes along with visibility status.
  2. when i update this visibility status these attributes parameter also need to be update at same time...
  3. Name of attributes are :

 

Sure, sounds easy, show me how it looks when the attributes is updated on the block

 

 

 

Message 13 of 31

fkp7057
Advocate
Advocate

@attributes are mentioned my above msg. Most of all are hidden attributes... So it won't be visible in block

Those all attributes are my base data.

based on that my other (visible) attributes will change(for that I have used field text)..

0 Likes
Message 14 of 31

pbejse
Mentor
Mentor

As I started manually changing the attribute values for "FEEDER-KW" "BREAKER-RATING" and "NO.OF_POLE" for example,  the field value does not update on the "BREAKER-DETAIL" , "CT-DETAIL" etc.. via REGEN nor UpdatedField. I need to force it by going through the attributes to update the field value, but once i do that per block it behaves normally.

 

Can you verify that the same on your end?

 

Message 15 of 31

fkp7057
Advocate
Advocate

ok wait ill post screen cast for what exactly i wanted to do...

0 Likes
Message 16 of 31

fkp7057
Advocate
Advocate

SLD_block.png

@pbejse  see the snap how that block will work...

above connected attributes only need to be updated ... rest of other are custom attributes or a Multi line attributes(taken multiple field text value ) those no need to update it will update based on basic attributes which i have highlighted on above snap...

for better clarity refer screen cast...

 
 
 
 
 
 
 
 
 
0 Likes
Message 17 of 31

fkp7057
Advocate
Advocate

So ultimately i want all attribute (which are highlighted in snap) need to be updated along with viability state...

0 Likes
Message 18 of 31

pbejse
Mentor
Mentor

@fkp7057 wrote:

So ultimately i want all attribute (which are highlighted in snap) need to be updated along with viability state...


Got it. thumbsup.gif

Message 19 of 31

pbejse
Mentor
Mentor
Accepted solution

@fkp7057 wrote:

So ultimately i want all attribute (which are highlighted in snap) need to be updated along with viability state...


Apart from  the behaviour i pointed out earlier.

 

::---------------------------------------------------------::
::     VOTF to Write to file | VIFF for READ from file     ::
::---------------------------------------------------------::

 

Command: VOTF

Select objects: Specify opposite corner: 12 found

Select objects:
File name amd Location: D:\Downloads\thisFilebuddy.csv [ also open the file with excel (if exists) ]

 

Command: VOTF

Select objects: Specify opposite corner: 7 found

Select objects:
<<<<<<<<<< D:\Downloads\ththis guy.csvOpened for editing >>>>>>>>>> <-- if file is opened for editing

 

Command: VIFF

Handle "8E35" Visibiltiy "DIRECT-ACB-***-CT-CABLE-PANEL-NO DS" is set and specific Attributes restored
Handle "7D8D" Visibiltiy "MOTOR-MCCB-CONTACTOR-NO CT-CABLE-MOTOR-DS" is set and specific Attributes restored
Handle "7B71" Visibiltiy "DIRECT-MCCB-***-CT-BUSDUCT-PANEL-NO DS" is set and specific Attributes restored
Handle "7A63" Visibiltiy "DIRECT-ACB-***-NO CT-BUSDUCT-PANEL-NO DS" is set and specific Attributes restored
Handle "79DC" Visibiltiy "MOTOR-MCCB-CONTACTOR-NO CT-**-BLANK-NO DS" is set and specific Attributes restored
Handle "7955" Visibiltiy "MOTOR-MCCB-VFD-CT-CABLE-MOTOR-DS" is set and specific Attributes restored
Handle "1040" Visibiltiy "DIRECT-MCCB-***-CT-BUSDUCT-PANEL-NO DS" is set and specific Attributes restored

 

HTH

 

 

0 Likes
Message 20 of 31

fkp7057
Advocate
Advocate

@pbejse Thanks a ton....

thank you so much...  

thats what exactly i want...

0 Likes