Attributes - Export / Create More / Linking with Database ?
-
I have a question / some thoughts in 3 parts concerning the geometry attributes of SU objects - Groups / Components etc and Databases:
- Does anybody know if its possible to export the attributes of the Geometry created in SU to some type of Tabular format eg CSV, MS Excel, Access db etc ???
eg Export the Layer, Name, Definition Name, plus possibly any other (hidden) attributes eg an ID no. for each piece of geometry ???
Has a Ruby ever been written for this ???
(I think its possible that Todd may have worked on something similar to this in the past ???)
... - Apart from the add-on written by Al Hart (RenderPlus) has anybody else written any method to extend the range of attributes that you can populate (apart from Layer, Name and Definition Name).
... - Would it ever be possible to link an external database (eg MS Access) to the id no. of any geometry in SU - FROM WITHIN SU ??? (So you can select geometry by selecting / querying the table ALTERNATIVELY selecting rows in the table selects the geometry). What I'm talking about is a basic GIS capability. (it could then be used to build a BIM amongst many other things).
Potentially this would be HUGELY powerful. It would definitely put the PRO into SU PRO.
Is anybody interested in writing an add-on for this ???
...
Currently I'm looking into ways of linking a model to a database but at the moment the only option is the ArcGIS route.
...
Regards
Howard Leslie
- Does anybody know if its possible to export the attributes of the Geometry created in SU to some type of Tabular format eg CSV, MS Excel, Access db etc ???
-
I see a bit better where you're going with this, Howard, and I LIKE IT. What you're talking about would bridge the gap that has existed at least since I've been doing GIS: true 3D GIS. It would blur the lines between AutoCAD/SU architectural 3D modeling and GIS. I picture having SU functionality in ArcGIS but you're probably thinking more like GIS functionality in SU. But what's the difference? (other than thousands of dollars for GIS software licensing). The more the line between the 2 can be blurred, the better.
Sorry this doesn't address actually getting this done, just wanted to voice my excitement. I'll be watching this thread very closely for sure, great topic!
-Eric
-
I'm pretty sure that someone wrote a plugin that brought the google spreadsheet into SU for this type of stuff. I had no need for it, so I never really played with it. I'll see if I can find a reference to it for you though.
Chris
-
This is not the one I'm thinking of, but here is a thread I found:
http://groups.google.com/group/Ruby-API/browse_thread/thread/6dce0c657846ce5a/690d6aa54d43388e?lnk=gst&q=spreadsheet+google#690d6aa54d43388eI know there is a better. someone really put a lot of time into developing something like this....
hmm, this is a post that barely hints at what it was:
http://groups.google.com/group/Sketchup-Pro/browse_thread/thread/64db9d8e35ef91a4/602f6d2e572f0363?but if you search the groups for anything posted by this IDEVFH person, I think you'll find his work. Perhaps TBD could be of some help here. I know he helped test the product a little bit.
Good luck tracking this one down,
Chris
-
Sorry for the merciless posting, but I keep finding more ane more info. here are some more posts that might help:
http://groups.google.com/group/Sketchup-Pro/browse_thread/thread/9242c9429d3dc3a0/754c90c334e8b166?
maybe its just best to see his list of "recent" posts (almost all more than 1 year ago):
again, hope it helps.
Chris
-
Here's away of making a CSV that I was involved in a while ago...
You could expand it to include whatever you like - geometry, layers, attributes, materials etc...
-
We are working on two RpReports capabilities.
- RpReports is designed for manufacturers or distributors who want to make a library of components for their dealers of end users.
The dealer or end user places the components and gets a PDF report which includes an image (or interactive 3D PDF) or the components and ar report with quantities, pricing and totals.
- Space Design is a free add-on to create reports from components in the 3D Warehouse.
If you place a description in the model using SketchUp "Model Info", the component name and description appear in the report. If you want to include more attributes, you can user RpReports to populate the SKP models with attributes.
Also, there will be a special version of Space Design for the cleint to customize attributes and reports.
-
TIG,
I've tried out your Component Reporter - Works Pretty Well (also VERY fast).
I do, however, have a couple of requests.....If you have time, could you expand the CSV to include the following fields:
Layer
Name
Definition Name
Material(ie Colour)
... If Poss ...
SU Geometry ID No (if it exists) ~ Acad Handle
Any other useful attributes
...................................
Currently the Name field in the CSV is actually what the Entity Info Dialog Box calls the Definition Name. It would be good to have these the same for consistancy.
...
Regards
Howard Leslie -
@unknownuser said:
TIG,
I've tried out your Component Reporter - Works Pretty Well (also VERY fast).
I do, however, have a couple of requests.....
If you have time, could you expand the CSV to include the following fields:
Layer
Name
Definition Name
Material(ie Colour)
... If Poss ...
SU Geometry ID No (if it exists) ~ Acad Handle
Any other useful attributes
...................................
Currently the Name field in the CSV is actually what the Entity Info Dialog Box calls the Definition Name. It would be good to have these the same for consistency.
...
Regards
Howard LeslieSomething like this ?
http://www.sketchucation.com/forums/scf/viewtopic.php?f=153&t=1524 -
TIG,
Thank you very much for updating your ComponentReporter Script - it's really good.
Hugely appreciated.
Adding the extra fields is brilliant - this is so useful.
The only other adjustment you could make to the script would be to make the script report out all geometry (by default) - as now.
HOWEVER,
If you make a selection, then only the selected items will be reported upon.
The above is really a nice to have (if you had time)- it's not essential.
Thanks once again for modifying yor script.
Regards
Howard Leslie -
@unknownuser said:
TIG,
Thank you very much for updating your ComponentReporter Script - it's really good.
Hugely appreciated.
Adding the extra fields is brilliant - this is so useful.
The only other adjustment you could make to the script would be to make the script report out all geometry (by default) - as now.
HOWEVER,
If you make a selection, then only the selected items will be reported upon.
The above is really a nice to have (if you had time)- it's not essential.
Thanks once again for modifying yor script.
Regards
Howard LeslieI think this is what you want ?
http://www.sketchucation.com/forums/scf/viewtopic.php?p=6684#p6684
(v1.1)http://www.sketchucation.com/forums/scf/viewtopic.php?p=6684#p6684
-
TIG,
V 1.1 really is excellent.
It's extremely useful being able to run this script on a selection from a model.
I think many people will find this script useful
For an example see:
viewtopic.php?f=22&t=3429
(your script could now be in Siberia !!!)
...
Currently I'm running the script on a model containing many components.
Originally some of these components were contained within other components (nested) others were grouped together.
...
I found that the script does not drill down into nested components or grouped components.
Not a huge problem as a workaround is to explode the larger components and groups.
However, would it ever be possible to have the script drill down into more complex (nested) components and groups to get at the buried ones ???
...
Thanks once again for all your help
Regards
Howard Leslie -
I wrote this Outliner exporter for a specific purpose, but it may be of use to someone.
http://sketchuptips.blogspot.com/2007/10/plugin-export-outliner.html
-
@unknownuser said:
TIG,
V 1.1 really is excellent.
It's extremely useful being able to run this script on a selection from a model.
I think many people will find this script useful
For an example see:
http://www.sketchucation.com/scf/viewtopic.php?f=22&t=3429
(your script could now be in Siberia !!!)
...
Currently I'm running the script on a model containing many components.
Originally some of these components were contained within other components (nested) others were grouped together.
...
I found that the script does not drill down into nested components or grouped components.
Not a huge problem as a workaround is to explode the larger components and groups.***
However, would it ever be possible to have the script drill down into more complex (nested) components and groups to get at the buried ones ???
...
Thanks once again for all your help
Regards
Howard LeslieThe script first reports ALL component definitions and how many times they are placed/used, of course this might include components nested inside other components etc. It then makes a report of all placed Instances that are accessible directly within the model. An alternative is to select a collection of objects containing some instances and it'll offer the option of reporting just on those.
***No need to explode anything... IF you have component instances inside groups or within other components then you can simply edit that group/component and select all - you then run the script and will get the chance to make a report of just the instances in that selection.
It COULD mine down into all component instances definition or groups and report on the internal bits... but you have to stop somewhere. Simply clicking the group/component to edit and Ctrl+A to select all before running it will give you a list of what instances are there...
I have previously made 'group_miner.rb' that does just that iterative delving into nested things BUT unless there's a massive clamour for it I won't be adjusting this script immediately...
-
I decided that adding the 'mining' ability wasn't too hard... so here's v1.2
http://www.sketchucation.com/forums/scf/viewtopic.php?p=6685#p6685
You now get the chance to 'mine' down through nested-groups/components to get a report on all instances found - either 'all' or in an initial selection.
-
I am getting an error message. There is a conflict with RpTools.
@unknownuser said:
C:/Program Files/Render Plus Systems/RpTools/test-Component+Report.csv NOT available for writing (it might be open) !
Exiting...RpTools puts a menu item called Model Report in the Tools menu. It offers the option to create a text or Excel file. The file is saved in the program file. The file it creates is called test_report.txt (or csv).
This error message occurs whether or not I used Model Report to create a file.
-
TIG,
Thanks for putting this mining ability into the Reporting Tool.
However, I'm also getting a similar error message to the one described by gata
(see attached)
...
Regards
Howard L' -
@unknownuser said:
TIG,
Thanks for putting this mining ability into the Reporting Tool.
However, I'm also getting a similar error message to the one described by gata
(see attached)
...
Regards
Howard L'Well at least you are getting that error !!! - I've been trying to get it for some time - without success ! It's not a clash with other scripts (I think) - where was the 'test' skp saved ?
I added an extra bit in when I made the 'miner' that tries to check if the report file is open before you start to write to it. For example you make a report and open it, you leave it open and try to make a second report - this time it can't write to the file since you already have it open in another program. It fails dumping errors into the Ruby Console. I've tried to trap this in an error message - with little success.
Here's v1.3 that has that part disabled till I get it going better. Meanwhile it works as advertised. IF it doesn't end with the closing message saying what it's written where then chances are it's failing because the older report is still open and you forgot to close it...
http://www.sketchucation.com/forums/scf/viewtopic.php?p=6686#p6686
-
I'm getting your files now - in C:\Program Files\Render Plus Systems\RpTools
RpTools reports go to the same directory. Their files are named test_report.txt (and csv).
No error messages appear in the Ruby console.
I did not get a closing saying the files were written - even the first time I successfully tried it here. I had opened the files in Excel to see how they look (had to move over the column a bit) then closed Excel.
I ran your script a second time and still did not get the closing message. The only message I get is one saying it will save the files to the RpTools directory.
XP Pro, SP2.
-
@gata said:
I'm getting your files now - in C:\Program Files\Render Plus Systems\RpTools
RpTools reports go to the same directory. Their files are named test_report.txt (and csv).
No error messages appear in the Ruby console.
I did not get a closing saying the files were written - even the first time I successfully tried it here. I had opened the files in Excel to see how they look (had to move over the column a bit) then closed Excel.
I ran your script a second time and still did not get the closing message. The only message I get is one saying it will save the files to the RpTools directory.
XP Pro, SP2.
The older/simpler ComponentReporter.rb made a csv [comma] and a txt [tab] file, BUT that went into the model's folder and were named as the ModelName-ComponentReport.XXX
The new version only makes the csv file and has a '+' sign after Component in the file name. Clearly what you are running isn't my script. I don't have the RpTools so I don't know what they do. If there is 'Class' clash it might cause my menu item to run something in their script...
To test this make a backup copy of my ComponentReporter+.rb script, open the original in Notepad [or another plain text editor BUT NOT a word-processor !]. Find and replace Reporter (which is the Class) with say ReporterPlus for every instance thus:
...
class Reporter >>> class ReporterPlus
...
def Reporter::components_plus >>> def ReporterPlus::components_plus
...
def Reporter::miner(ents) >>> def ReporterPlus::miner(ents)
...
xlist=Reporter.miner(elist) >>> xlist=ReporterPlus.miner(elist)
...
full_list=Reporter.miner(all_list) >>> full_list=ReporterPlus.miner(all_list)
...
UI.menu("Plugins").add_item("Component+ Report"){Reporter.components_plus} >>> UI.menu("Plugins").add_item("Component+ Report [TIG]"){ReporterPlus.components_plus}
...
Note when you scroll to near the end and find the menu string - you should add something onto the text like [TIG]. Save the file and re-run.
You should now get an item in the Plugins menu with the [TIG] in itthat runs my script alone...
Advertisement