November 6, 2016 at 19:18 #2830
Hello, I am trying to use a variable as the target for invoking the POINTCLOUD command.
In the GDL Reference guide it states: “data_file_name: the name of the loaded library part containing the point cloud data. Must be a string expression.”
But when I try to trigger the POINTCLOUD command using a string variable, the script prompts the next error: Constant string type expression required.
I am trying to use the POINTCLOUD command similarly to how you would use the PICTURE command. Is there a reason why it should not work the same way if the library part is loaded?
November 7, 2016 at 15:26 #2839
The POINTCLOUD command was designed to work this way. In ARCHICAD, GDL objects created by the PointCloud add-on contain exactly one PointCloud reference per object. This is why names as variables are not accepted in the first place. The second reason for this was to support background compatibility, same as with macro calls: exact names can be handled deterministically, which makes it a lot faster to process.
Objects created without the add-on can contain more POINTCLOUD commands.
POINTCLOUD command is more like a macro CALL without parameters than a PICTURE.
Library Developer, Library Team
November 7, 2016 at 16:10 #2840
Hello Peter, thanks for your response. I get your point that the POINTCLOUD command works more similarly to a macro CALL, pointing to an specific data file within the library with .gspc extension. In the GDL reference guide it does not say that the string expresion must be constant: “data_file_name: the name of the loaded library part containing the point cloud data. Must be a string expression.”
Macro CALL command does work with variables as the target. And so should the POINTCLOUD command. I think the way the default object generated from Pointclouds at the moment is very limited, and what I am developing is an object to handle Pointclouds within Archicad in a more useful way for the user. But I am currently stuck with having to edit the object in the GDL editor, just to change the target .gspc libray part of the POINTCOULD command.
November 8, 2016 at 11:51 #2844
You should not use macro calls with variable macro names – as it kills background processing. Thats why we won’t enable variable names in the pointcloud command in the near future.
Team Leader, Library Team
You must be logged in to reply to this topic.