Parmetrized project design (Part 2)

Parmetrized project design (Part 2)

GoranBe
Advocate Advocate
1,347 Views
7 Replies
Message 1 of 8

Parmetrized project design (Part 2)

GoranBe
Advocate
Advocate

Hello,

 

this post is somehow realted to my previous post "Parmetrized project design (Part 1)". Please see that post for details including link to source files.

 

In short, I'm having a "base parameter" no-part part file (namely "TheBoxParameters.ipt") with exported custom parameters that drive the project.  I'd like to define a custom text parameter(s) in this file which will be used later in drawing files (idw) as a custom posftix to a common paramater in the table.

 

For example, let's say I will define custom strings paramaters TitlePostfix = "500 x 500" and "PartNumberPostfix = "-2019-1" in base parameter file. I would like to reflect those in table cells of "derived" parts eg in text defined by: 

<TITLE><TitlePostfix>

<PART NUMBER><PartNumberPostfix>

 

But I can't.  I don't see custom text parameters in FormatText dialog at all. AFAIK text parameters can't be exportd or I don't know how to export them. If I'd be able to export text I'd be able to select it from "Custom Properties - Model" parameters pulldown.

 

Any ideas how to do it?

 

Regards,

Goran

 

 

 

Accepted solutions (1)
1,348 Views
7 Replies
Replies (7)
Message 2 of 8

blandb
Mentor
Mentor

Can you not use Ilogic to pass this information to a custom iProperty?

Autodesk Certified Professional
Message 3 of 8

GoranBe
Advocate
Advocate

Hi,

 

I don't think I can use iLogic either.  AFAIK I can't reach text parameter from linked part file regradless if I try to use it from iLogic or not.

 

I could write iLogic that looks for text in some other file or something similar of course. But at the end all I need is an exported text paramater. If somebody confirms that this is impossible I will use exported numerical parameters instead. It just gives me lesss freeedom in customization of the specialisation of parametrized project.

 

Regards,

Goran

Message 4 of 8

johnsonshiue
Community Manager
Community Manager
Accepted solution

 

Hi! iLogic rule works. You can simply retrieve or set a parameter from another part within a part.

For example, you have a text parameter called "VENDOR" in PartA. You would like to retrieve it in PartB. Here is what you need to do.

1) Link or derive PartA to PartB.

2) Create a text parameter in PartB also called "VENDOR"

3) Write the following rule.

VENDOR = Parameter("PartA.ipt","VENDOR")

 

You can get the text from PartA to PartB. You can also set the value to the one in PartA.

Many thanks!

 



Johnson Shiue (johnson.shiue@autodesk.com)
Software Test Engineer
Message 5 of 8

GoranBe
Advocate
Advocate

Johnson,

 

thank you very much for your answer.  I will try it in following days. I will accept your answer as solution though in my opinion is more a workaround actually.

 

If you know, can you please explain why text parameters can't be exported? It would be *much* simpler to use text parameter directly than to copy stright-forward iLogic to every single file where I need the text from the "base" file. I will create templates, for sure, but it stil seems kind of limiting and, khm, unnecessary...

 

Regards,

Goran

Message 6 of 8

Cadderman
Enthusiast
Enthusiast

VENDOR = Parameter("PartA.ipt","VENDOR")

 

@johnsonshiue This code is great for models that aren't being copied as it specifies the filename.  Is there a way to sit this code in a template that would undergo a complete copy design with new filenames?

 

 

0 Likes
Message 7 of 8

johnsonshiue
Community Manager
Community Manager

Hi! I suspect Inventor API calls might be needed here to work within a template. I am not sure. Please feel free to post the question on Inventor iLogic, API, and VBA forum. The experts there could take a look and propose some solutions.

Many thanks!



Johnson Shiue (johnson.shiue@autodesk.com)
Software Test Engineer
0 Likes
Message 8 of 8

BDCollett
Advisor
Advisor

@Cadderman wrote:

VENDOR = Parameter("PartA.ipt","VENDOR")

 

@johnsonshiue This code is great for models that aren't being copied as it specifies the filename.  Is there a way to sit this code in a template that would undergo a complete copy design with new filenames?

 

 


I always make the code link to the part in the browser, instead of PartA:1 you rename to PartA, this will be the same in every copied part and the rule will work.