Developer forum
cancel
Showing results for 
Search instead for 
Did you mean: 

Cant changer surface

Anonymous
Not applicable
Hi

I have som objects that have been made of morphs, and some has been importer as RFA objects, and converted to morph. When im saving them after morph, im saving them as MEP PARTS.
The problem is, i cant change the surface where i want it to.

If you look on the attached image, i want to change the surafe there, at number 1, but when i do, nothing is happening. But at number 2, i can change it, but i dont want to change it there. Where can this be fixed?
1 ACCEPTED SOLUTION

Solution
Barry Kelly
Moderator
You will need to open the object and edit the 3D script.

Search for all of the lines that say .... material "Plastic - White"
There are more than I show in the image.

This is hard coding the material to Plastic - White.

Replace the line with ... material MainBoxMaterial

This will now use the material parameter that you want - make sure you don't use quotes.

Barry.

One of the forum moderators.
Versions 6.5 to 25
Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
Dell Precision 3510 - i7 6820HQ @ 2.70GHz, 16GB RAM, AMD FirePro W5130M, Windows 10

View solution in original post

16 REPLIES 16

Peter Baksa
Graphisoft
Graphisoft
Did you also turn off the override at 2 by clicking the paintbrush icon?
Péter Baksa
Software Engineer, Library as a Platform
Graphisoft SE, Budapest

Anonymous
Not applicable
Hi.

Yes, when its off its the same, cant change it where i want to.

Peter Baksa
Graphisoft
Graphisoft
It looks like the created object uses hard-coded attributes. The parameters you see on the UI are parameters of the selected subtype, but they aren't connected to anything in the script. I will report it as a bug.
Péter Baksa
Software Engineer, Library as a Platform
Graphisoft SE, Budapest

Anonymous
Not applicable
Alright.

So what can i do with it now? Can it be fixed somehow? Do I just need to wait?

Peter Baksa
Graphisoft
Graphisoft
SandraGS wrote:
Alright.

So what can i do with it now? Can it be fixed somehow? Do I just need to wait?
You have to edit the generated 3D script to use parameters instead of hard-coded string attributes. You might have to add more parameters if the morph has many surfaces.
Péter Baksa
Software Engineer, Library as a Platform
Graphisoft SE, Budapest

Anonymous
Not applicable
This is very new to me, so can you maybe show me an example? Of where i need to change it?

Its a lot in the script, and i dont know where to start or what to remove or anything.

Lingwisyer
Virtuoso
Is the whole object a single material? If so...

Open the Parameters Script of the object and find the parameter that matches what you have highlighted in your image. Take note of that variable (A).
In the 3D Script add a line at the start that is "Material [variable A]"
Search through the rest of the script and remove any other "Material" commands. Just putting an exclamation mark infront of the command will ignore it.



Ling.
AC18-23 AUS 7000
Self-taught, bend it till it breaks.
Win10 | E5620 x 2 | 24GB | K2200

Win10 | R5 2600 | 16GB | GTX1660

Peter Baksa
Graphisoft
Graphisoft
SandraGS wrote:
This is very new to me, so can you maybe show me an example? Of where i need to change it?

Its a lot in the script, and i dont know where to start or what to remove or anything.
The 3D script contains statements like

r = REQUEST{2} ("Building_Material_info", "Water", "gs_bmat_surface", bms_47)
set building_material "Water", 104, -1
material "Wood - Pine Grained Horizontal"
In this situation building_material only defines the cut surface and fill of the object. The materials are the outer surfaces. Count the number of different strings for each type.

In the parameter list search for "surface". There is the generated parameter MainBoxMaterial. Add new surface or building material parameters in the quantity you need. You can use MainBoxMaterial for the main surface. Give them a nice name and replace the strings in the script with the names, without quotation marks. eg
material MainBoxMaterial
Péter Baksa
Software Engineer, Library as a Platform
Graphisoft SE, Budapest

Anonymous
Not applicable
Hi.

So, both your suggestions didnt work for me.

I couldnt find any paramters that matches what im looking for in the parameter script..

And when im trying to change the surface, nothing happens.

But i had support case with a client earlier, and found out that some objects in the archicad library, has the same problem, just there you actully can change it where you want to.

Maybe this says you guys something more then me? Why can i change it there?

A_ Smith
Booster
If you can't post the object, it's hard to tell what is wrong. I can only suggest you do as Ling said. If the object is made of one type of material you could manually comment each material statement in 3D sript - press Ctrl+F (windows OS) and replace "material" with "!material" - apply to all. Now all materials are ignored. All that is left to write new material statement with the new_material_variable at the beginning of 3D Script - [SET] MATERIAL name_or_index. You have to create this new_material_variable in Parameters, not Parameter Script.
AC 22, 24 | Win 10

Anonymous
Not applicable
Hi

I can post the object.

You can download it from here

https://we.tl/t-7UlgQhBpry

Solution
Barry Kelly
Moderator
You will need to open the object and edit the 3D script.

Search for all of the lines that say .... material "Plastic - White"
There are more than I show in the image.

This is hard coding the material to Plastic - White.

Replace the line with ... material MainBoxMaterial

This will now use the material parameter that you want - make sure you don't use quotes.

Barry.

One of the forum moderators.
Versions 6.5 to 25
Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
Dell Precision 3510 - i7 6820HQ @ 2.70GHz, 16GB RAM, AMD FirePro W5130M, Windows 10

View solution in original post

Anonymous
Not applicable
Hi

This was working wery well on some of the objects.
So thank you so much

But i have some objects its not working on.

Could you mayhbe take a look at that as well?

https://we.tl/t-V1C9bEVkMP

Anonymous
Not applicable
I know that i need to change the material name, but when i do that same process, i can only change surface on the little dot in the middle, and i want to change it all

A_ Smith
Booster
Well, you should look through the whole 3D script for material statements. Here there are several of them - for different materials - variables bms_1 and bms_168, and ordinary materials - "Maling - 01 Matt" and "Maling - 01 Blank".
that's why you need to add after requests bms_1=MainBoxMaterial and bms_168=MainBoxMaterial and replace those materials as you did before
AC 22, 24 | Win 10

Anonymous
Not applicable
Thank you so much everyone. Its what i wanted now

Still looking?

Browse more topics

Back to forum

See latest solutions

Accepted solutions

Start a new discussion!