Excel to Object GDL
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2014-01-23 01:33 AM
I gather this can be done via XML.
Just trying to find an example file to determine if and how it can be done.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2014-01-26 02:42 PM
You find it here:
The object can't be placed in the floor plan, open it from the library.
The library is type of .lcf, which must first be converted to a normal library)
The object reads a projectinfo file (.xml-file which has been saved from Archicad project-info tab) ,and turns it into parameters' values.
You can use this method for your custom objects.
There´s another method in Special menu. You can export objects to xml and import them. Just manipulate the xml file and you get objects on the floorplan with parameters you have changed in the xml-file.
Have nice moments with these.
“A winner is just a loser who tried one more time.”
George M. Moore, Jr.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2014-01-27 05:09 PM
Another option would be using plain text files (maybe CSV) exported from excel; and use the channel->OPEN command.
It works nicely.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2014-01-29 11:00 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2014-01-29 10:20 PM
I will give the plain text files a go first. It sounds powerful and hopefully my brain will keep ticking after I work out the code
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2014-08-07 02:11 AM
I have been searching forums, but still struggling.
What I want to do is read the values of a tab illuminated text file
example
test.txt
aa 11 22
bb 33 44
cc 55 66
... ... ....
I might end up having 80 rows, and I want to read these just for a label.
I am trying to work out how to use the open and input commands to read these values.
Would I need to create parameters for each field I want to read.
This is what I have put together, which doesnt work in the slightest
ch1=OPEN("TEXT",test.txt,"SEPARATOR='\t',MODE=RO,LIBRARY")
n=input(ch1,1,1,var1,var2,var3)
n=input(ch1,1,2,var4,var5,var6)
n=input(ch1,1,3,var7,var8,var9)
close ch1
I know I am way off, but struggling to understand the principals.
There isn't enough object examples out there
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2014-08-08 01:33 AM
This is one of the many code snippets found in this great forum. I've found it pretty handy to remember how to read from text files. The GDL reference is quite technical and complete, but not user friendly.
Perhaps this can help you understand the basics and move from there... it sure did help me. I don't remember who posted it though.
! Example to read all string values from a file ! and use it in a value list DIM sarray[] ! file in the library, containing parameter data filename = "ProjectNotes.txt" ch1 = OPEN ("text", filename, "MODE=RO, LIBRARY") i = 1 j = 1 sarray[1] = "" ! collect all strings DO n = INPUT (ch1, i, 1, var) IF n > 0 AND VARTYPE (var) = 2 THEN sarrayI used this to learn and script a "text notes" object that reads any tab-separated text file to show different tabulated data, regardless of row/column count.= var j = j + 1 ENDIF i = i + 1 WHILE n > 0 CLOSE ch1 ! parameter popup with strings
Hope it helps.
Best regards.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2017-11-27 06:11 AM
Hoping someone can help me.
I cannot work out how to read a text file into a pulldown window in an object.
Is that possible? The pulldown window may have a different number of fields depending on the text file, not sure if this is an issue setting the size of the array. I assume arrays are static sizes.
Any help would be appreciated
Thanks
Tom
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2017-11-27 01:39 PM
Tom wrote:
Coming back to this post.
Hoping someone can help me.
I cannot work out how to read a text file into a pulldown window in an object.
Is that possible? The pulldown window may have a different number of fields depending on the text file, not sure if this is an issue setting the size of the array. I assume arrays are static sizes.
Any help would be appreciated
Thanks
Tom
Windows 10
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2017-11-27 10:27 PM
I was referring to this but it seems to have a fixed array size of 7.
Makes me think I cannot have a pulldown box with a different size depending on the size of input text file
Tom