I need help for work with file exported from DIALUX.

I need help for work with file exported from DIALUX.

jtm2020hyo
Collaborator Collaborator
1,246 Views
7 Replies
Message 1 of 8

I need help for work with file exported from DIALUX.

jtm2020hyo
Collaborator
Collaborator

Hello. I'm from Junín-Perú. I'm helping in the work of the future Estadio Huancayo that will be built in 5 years (An Stadium).

 

image.png

 

google coordinates : -12.071819,-75.202454

URL: https://www.google.com.pe/maps/place/12%C2%B004'18.6%22S+75%C2%B012'08.8%22W/@-12.0731213,-75.201749...

 

 

I received files from Dialux (in first attach) and I need to convert those files to blocks of lights (like the second attached) from our legend and add lines that represent tubes and finally, I need add switchers. A day normal for people that work with interior lighting.

 

My problem is that is the first time that I received files from DIALUX (used for Europeans interior lighting calculation) and I received a lot of groups with  3D polylines.

 

image.png

 

 

I tried a search in google for a lisp that converts Groups in Blocks, I found one but need be modified

 

; rename version
; original code by ASMI rename by Alan H
(defun c:pb (/ lPt)
(and(setq lPt(getvar "LASTPOINT"))
(vl-cmdf "_.copybase" lPt (ssget) "")
(vl-cmdf "_.pasteblock" lPt)
(setq objname (assoc 2 (cdr(entget (entlast))))) 
(vl-cmdf "_.erase" "_p" "")
(command "-rename" "block" (cdr objname) (getstring "Enter new name"))
)
(princ)
); end of c:pb

 

I tried asking for help ins this forum but apparently is not possible.

 

link to the post where I'm asking for help: https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/convert-un-named-groups-to-blocks/td...

 

So now I'm asking for suggestings of people. What LISP-routines should I use to work with this problem?

 

PD: The third attached file is my list of LISP routines that I'm using to work. 

PD: This project will be updated each month. so It files will need an update constantly.

 

 

 

 

 

 

 

0 Likes
1,247 Views
7 Replies
Replies (7)
Message 2 of 8

roland.r71
Collaborator
Collaborator

Do you happen to have another flavor of files but .rar?

I can't download/open those from my current location.

 

So if you could share just 1 of those PLANOS EXPORTADOS files unzipped/rar'd, i can have a look.

(preferably (the) one you used for the example dwg. So i can see what you have, before & after)

 

BTW: Here in Europe DIALux is used for both interior and exterior lighting calculations.

Used it ones myself, years ago, for a highvoltage switching field. However, we did not do any conversion.

0 Likes
Message 3 of 8

cadffm
Consultant
Consultant
@Anonymous
The files are not important for the question/solution.
Read the other linked thread, there are more informations and one clean dwg example.

The first ask was 'foreach group: build block and replace objects with blockreference'
(One click convert for all groups)

But follow he needs a contour checker
to replace symbols (group/blockref) of the same kind/type with blockreferences of one block (one block, multiple inserts for this on type of symbol)
Note my Hint: There are texts with the type near to the group, but it isn't part of the group)

For the last step the program have to check which should the angle for the blockreference.


Sebastian

0 Likes
Message 4 of 8

roland.r71
Collaborator
Collaborator

Yeah, i was aware of the other thread, but at contained the same .rar files.

But i missed some of the earlier attachments. So i just got a look at 1.TRIBUNA EXISTENTE.rev1.dwg

 

I can't open the "how it should be" example, as it's created with a newer version acad as my 2015.

 

However, looking at the source, i wonder if a conversion is realy needed.

As each group consists of 5 overlapping blocks. (mostly just 2 different blocks, 1 is 2x on top of eachother, the other 3x (!?!?!?). The 2x blocks share geometry with the 3x blocks (so they completely overlap (this includes the insertion point), the 3x blocks just having extra "lines")

 

These blocks are used for all the lights. Example: 650_2_1 is used within ALL groups (with similar lights)

 

Not sure what he wants exactly, as i can't look at the example, but currently i would say, ungroup all of them & delete 4 out of 5 blocks & your done.

0 Likes
Message 5 of 8

cadffm
Consultant
Consultant
You (we) need the dwg who starts with a "2" in the name.

(I had need a few minutes too, to find the "right" file)

Dialux should can create Blocks to, but if so, only one step (group2block) is done, because thats all anonymous blocks, for each insert one block.
(The first goal what OP wanted)

Sebastian

0 Likes
Message 6 of 8

cadffm
Consultant
Consultant

Oops.

@roland.r71

I have to add: The file "2 * .dwg" contains only groups, so this file was initially used as a basis, the file 3 *. Dwg has the same structure.

If you look at the other files 1 * .dwg you will find many blocks,
if you look at them, I also think they are not from the OR,
but from the program.

These are not untitled and are really used very well.

So exactly I had not looked at the file with blocks because I thought this would have been handled by the AP already handy.

 

@jtm2020hyo

Please explain us from where the '1. TRIBUNA EXISTENTE.rev1.dwg' is and why you can not use them.

 

Confused now..

 

Sebastian

0 Likes
Message 7 of 8

DannyNL
Advisor
Advisor

Well, I did open one of the drawings from one of the RAR's that is supposedly generated by DIALux (3. TRIBUNA ORIENTE.rev1.dwg). In this drawing there are only groups of 3D polylines.

 

But DIALux indeed should be able to export as blocks as in some of the other drawings, so it looks to me like it is a problem with how the file is exported from DIALux.

0 Likes
Message 8 of 8

jtm2020hyo
Collaborator
Collaborator

@DannyNL wrote:

Well, I did open one of the drawings from one of the RAR's that is supposedly generated by DIALux (3. TRIBUNA ORIENTE.rev1.dwg). In this drawing there are only groups of 3D polylines.

 

But DIALux indeed should be able to export as blocks as in some of the other drawings, so it looks to me like it is a problem with how the file is exported from DIALux.


 

Thanks for your time. I will request for new files.

0 Likes