CAD Forum - Database of tips, tricks and utilities for AutoCAD, Inventor and other Autodesk products [www.cadforum.cz]
CZ | EN | DE
Login or
registration
  Visitors: 3545
RSS channel - CAD tips RSS tips
RSS discussions

Discussion Discussion forum

 

HelpCAD discussion

 
CAD Forum - Homepage CAD discussion forum - ask any CAD-related questions here, share your CAD knowledge on AutoCAD, Inventor, Revit and other Autodesk software with your peers from all over the world. To start a new topic, choose an appropriate forum.

Please abide by the rules of this forum.

How to post questions: register or login, go to the specific forum and click the NEW TOPIC button.
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Topic Closedpoint colour import

 Post Reply Post Reply
Author
olyo View Drop Down
Newbie
Newbie


Joined: 25.Jan.2011
Location: Croatia
Using: AutoCAD Civil 3D 2010
Status: Offline
Points: 3
Direct Link To This Post Topic: point colour import
    Posted: 25.Jan.2011 at 09:44
Hello everybody!
I need helpStar
Is there a way to import colour along with point coordinates? For example, I have points defined in .txt format in three columns, after which I have three columns that contain RGB colour components:
 
              X                  Y                    Z                  R                   G                   B
           100                200               300                51                 153                204
 
So I would like to import this point in this colour into AutoCAD.
Is there a way to do that?
 
 


Edited by olyo - 25.Jan.2011 at 10:00
Back to Top
CarlB View Drop Down
Senior Member
Senior Member


Joined: 16.Oct.2009
Location: United States
Status: Offline
Points: 321
Direct Link To This Post Posted: 26.Jan.2011 at 09:53
You'd have to use a script or some code (lisp, etc.)
 
For example a lisp routine could read the file, one line at a time. the first 3 items in a line would be combined to for a 3d point. The next 3 values combined to form "r,g,b".
The coordinate would be fed to a "point" command.then "change" or "chprop" command, "color" then the RGB value.
Repeat for each line in the text file.
 
Script would be tedious. You might first manipulate in Excel to combine the values.
 
A script file would look like;
point
x1,y1,z1
change
l
p
c
r1,g1,b1
 
point
x2,y2,z2
etc...on and on for all points
Back to Top
olyo View Drop Down
Newbie
Newbie


Joined: 25.Jan.2011
Location: Croatia
Using: AutoCAD Civil 3D 2010
Status: Offline
Points: 3
Direct Link To This Post Posted: 26.Jan.2011 at 15:57
Hello!
Thank you very much for replaying so fast. I don't know how to use lisps so I tried to form a script file and I did it and my points got their color Smile
Thank you again.
Back to Top
HAWDesigner View Drop Down
Senior Member
Senior Member


Joined: 04.Aug.2008
Location: United States
Using: AutoCAD R14, AutoCAD 2009, AutoCAD 2010
Status: Offline
Points: 310
Direct Link To This Post Posted: 26.Jan.2011 at 20:31
olyo, could you provide a sample of the script for us?

Thanks!!
--
R. Williams
AutoCAD 2010 Certified Professional
<!-- If all else fails hit F1 -->
<<AutoCAD 2009
Back to Top
olyo View Drop Down
Newbie
Newbie


Joined: 25.Jan.2011
Location: Croatia
Using: AutoCAD Civil 3D 2010
Status: Offline
Points: 3
Direct Link To This Post Posted: 27.Jan.2011 at 08:11
Hi!
I used excel to form script;
CONCATENATE(point;" ";X;",";Y;",";Z;" ";chprop;" ";p;" ";" ";color;" ";t;" ";R;",";G;",";B)
And in scr file it looked like this
point X,Y,Z chprop p  color t R,G,B
 
And that's it Big%20smile 
 
 
Back to Top

Related CAD tips:


 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down



This page was generated in 0,414 seconds.