Community
Civil 3D Forum
Welcome to Autodesk’s Civil 3D Forums. Share your knowledge, ask questions, and explore popular AutoCAD Civil 3D topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Subassembly Composer - Point Codes

7 REPLIES 7
SOLVED
Reply
Message 1 of 8
seanp.fahey
2126 Views, 7 Replies

Subassembly Composer - Point Codes

Does anyone know if Subassembly Composer has some coding that allows a user to input a custom point code, but it will add to that custom point code depending on if the subassembly composer is on the right or left side?

I am trying to avoid having a bunch of custom point codes that someone has to fill out and have the subassembly perform most of the work.  

 

For example, I have a curb and gutter subassembly that when I am modeling the feature lines are crossing over the baseline and creating linework that is not correct.  My thinking is that if I had different enough point codes then the feature lines would be created from those unique point codes and wouldn't cross over each other.

If this is not possible, that's fine I will simply add more input parameters.

Labels (3)
7 REPLIES 7
Message 2 of 8
ecfernandez
in reply to: seanp.fahey

Hi @seanp.fahey, I would create a String Variable to keep the custom code that the user will enter. The user would have to enter that code as a String Input Parameter. Then, the assignation process for the code would depend on an "If condition" that would evaluate if the subassembly is inserted on the left or right side of the main assembly (Side=Right). Depending on this, the value for the variable would be set using a "Set Variable Value," and finally, the variable would have to be placed into the "point code" field of the point that you want to code.

Custom CodeCustom Code

Left sideLeft sideRight sideRight side

 

I hope this helps. I attach the PKT file as a compressed ZIP for you to check what I did.

Best regards!

 

 

 


Camilo Fernández
Civil engineer, Specialist in design, construction, and maintenance of roads
Winnipeg, MB, Canada

LinkedInAccount

Message 3 of 8
RonaldBrañez
in reply to: seanp.fahey

Hi @seanp.fahey ,

Adding to what @ecfernandez already said, you could also simply create the Define variables with the name CustomCodeVariable of type string, and in the default value, you could write the following code:

 

If (Side = Left, String.concat ("Left -", CustomCode), String.concat ("Right -", CustomCode))

 

and continues with the corresponding geometry, assigning to the code box, the variable previously defined.

 

RonaldBrañez_1-1614627046648.png

 

 

RonaldBrañez_2-1614627159061.png

 

 

If this is not how you propose it (assign a side), and the subassembly follows an Offset Target Parameter which crosses the Base Line, then replace the CustomCodeVariable code with the following:

 

If (OffsetTargetParameter.Offset <0, String.concat ("Left -", CustomCode), String.concat ("Right -", CustomCode))

 

 

and continues with the corresponding geometry, assigning to the code box, the variable previously defined.

 

RonaldBrañez_4-1614627327321.png

 

 

RonaldBrañez_5-1614627423546.png

 

I leave you both subassemblies so you can see them better.

 

Regards.

Message 4 of 8
seanp.fahey
in reply to: ecfernandez

Thank you, this was helpful in getting me going in the direction I wanted. More specifically it was nice to know the code needed.
Message 5 of 8
kidznok
in reply to: RonaldBrañez

Hi,
Could you help me?
I would like to create Define Variable to returns full code for example:

kidznok_2-1660807142600.png

Message 6 of 8
RonaldBrañez
in reply to: kidznok

Hi @kidznok 

 

Verify that the Variable Type is set correctly (String)

 

RonaldBraez_0-1660825757451.png

Regards.

Message 7 of 8
ecfernandez
in reply to: seanp.fahey

I coincide with @RonaldBrañez. Your code line looks OK. Check the variable type you are using to make it work.

Best regards!


Camilo Fernández
Civil engineer, Specialist in design, construction, and maintenance of roads
Winnipeg, MB, Canada

LinkedInAccount

Message 8 of 8
kidznok
in reply to: ecfernandez

I have sth like that

kidznok_0-1660838776690.png


When I change Side to "zakres" like a option it works but with Side nope.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Rail Community


Autodesk Design & Make Report