Message 1 of 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have a loop in which I am trying to change a the x-coordinate. Below is a portion of my code. The insert.Pt is a point inside a loop that will need to have the x-coordinate changed with each iteration. I get the following error when compiling:
"Property or indexer 'Autodesk.Revit.DB.XYZ.X' cannot be assigned to -- it is read only (CS0200) - C:\ProgramData\Autodesk\Revit\Macros\2016\Structure\AppHookup\ConcBeamSchedule\Source\ConcBeamSchedule\ThisApplication.cs:167,8"
Autodesk.Revit.DB.XYZ originPt;
Autodesk.Revit.DB.XYZ insertPt;
originPt = Application.Create.NewXYZ(0.0, 0.0, 0.0);
insertPt.X=originPt;
insertPt.X=insertPt.X + 4/12;
Stanley
Solved! Go to Solution.