about *createentity using problem
i want to edit comp's id when i creat comp,but it fail.
curly brackets cant read this $count
anyone can solve this problem
Answers
-
Hi Shiu Comp,
I didn't understand your intention with this code, but I fixed it according to your question.
1° I made a loop, created a set for the name, and a component using that set.
2° Created a mark on this component to know with which ID it was created.
3° Using the ID that I stored in "comps_id", I updated it to match the current value of count, "i".
I don't see much use for this since the ID will always be the match the one that would be created normally.
Just an example:
Best regard,
Flauzino, C.
1 -
Carlos Flauzino_22279 said:
Hi Shiu Comp,
I didn't understand your intention with this code, but I fixed it according to your question.
1° I made a loop, created a set for the name, and a component using that set.
2° Created a mark on this component to know with which ID it was created.
3° Using the ID that I stored in "comps_id", I updated it to match the current value of count, "i".
I don't see much use for this since the ID will always be the match the one that would be created normally.
Just an example:
Best regard,
Flauzino, C.
Since I am a beginner and don't have a deep understanding of the commands, I modify based on the log generated by command1. What I originally wanted was to automatically create components and change their ID numbers.
0 -
Carlos Flauzino_22279 said:
Hi Shiu Comp,
I didn't understand your intention with this code, but I fixed it according to your question.
1° I made a loop, created a set for the name, and a component using that set.
2° Created a mark on this component to know with which ID it was created.
3° Using the ID that I stored in "comps_id", I updated it to match the current value of count, "i".
I don't see much use for this since the ID will always be the match the one that would be created normally.
Just an example:
Best regard,
Flauzino, C.
"Sorry, something funny happened. I originally tested the following syntax, and it didn't work:
*createentity comps id=40 name="component4"
But now when I tested it again, it worked. I can now create a component and customize its ID at the same time."
0 -
shiu comp said:
Since I am a beginner and don't have a deep understanding of the commands, I modify based on the log generated by command1. What I originally wanted was to automatically create components and change their ID numbers.
I started the same way, it's a good start!
I recommend using this page from Altair: https://help.altair.com/hwdesktop/hwd/topics/chapter_heads/tcl_modify_commands.htm
It helps a lot as well!
0