I am trying to place copies of an instance/object ( say a simple via ) with 'x' distance separation in X-direction.
Is there any in-built feature already available in IC5141 ?
Otherwise, is there any solution ( SKILL script) already posted in the forum ? I searched but couldn't find so.
The code needs three functions:
1) Find the cordianate of the OBJECT/INSTANCE ( this I have already found in the Forum)
2) Copy the object. For this what is the SKILL function ?
3) Paste the desired distance separation ( For palcing wht is the simple SKILL function)
Couls anybody please tell regarding this.
I didn't search to see if there was any code that does what you want, but it's trivial to write.
If you have the pitch in a variable dx, and the number of copies in numX, and the instance in instId, and cellView in cvId :
for(x 1 numX dbCopyFig(instId cvId list(x*dx:0 "R0" 1)))
So not hard...
In reply to Andrew Beckett:
Thanks a lot.
The dbCopyFig(), copy the figure at the relative offset with respect to the Lower Left corner of the bBox of the original object.
Is it possible to place/copy the object to a given arbitrary coordinate.
Also is it possible to make the relative movemt with respect to some other coordinate of the bBox.
Of courseone can write a script and do the manipulation to achieve the same. However I believe there may be way to do it by a single command.
In reply to RFStuff:
To copy to an absolute coordinate, you need to produce a concatenated transformation which moves back to the origin, then to the location you want. So for example, if you want to copy the lowerLeft of your object to a location xy, you'd do:
dbCopyFig(instId cvId dbConcatTransform(list(-xCoord(lowerLeft(instId~>bBox)):-yCoord(lowerLeft(instId~>bBox)) "R0" 1) list(xy "R0" 1)))
I don't really understand your second question, since a relative movement doesn't matter which coordinate it is with respect to - all coordinates in the bBox will move by the same relative amount. Maybe you're talking about an absolute move - in which case something like my suggestion above would make sense - you just compute the first transformation using a different coordinate on the shape (such as the upperRight rather than the lowerLeft).
Yes, what you have mentioned, I want exactly that.
One can copy and place by using dbCopyFig(),
I actullay want something as follow:-
I have a PATH running in MEx
I want to run PATHs of different metal undeneath/over it. The PATH may be of a) same width or b) different width
For Same width:-
newPath=dbCopyFig(obj obj->cellView list(0:0 "R0" ))
It works fine.
For different widh:-
I think oneway is to change the bBox property of the copied PATH.
With this line of thought I did as follows:-
bBoxNew=list(a:b c:d) % please note a,b,c,d are floating point desired co-ordinates
However the above DID NOT WORK.
Could you please tell what is the issue.
You cannot change the bBox of a path (or pathSeg) as it is a derived parameter. You can change the ~>points to alter the points in the path, or the ~>width to change the width.
O I forgot, that PATH has width property and one can assign new width to the existing width property.
But why bBox is not working.
Also I want to run a prallael path on both side of the MAIN path ( the PATH has multiple bends) . What should be done. Basically I want to make a shiled around the PATH
As I said, changing the bBox makes no sense for a path, because it is computed from the width/points of the shape, and so is a derived parameter rather than something that defines the shape.
If you want to offset from an existing path, you would probably be better off using rodCreatePath to do it. I suggest you read the documentation for this function (as it is quite powerful and has a lot of options, and there's no point me repeating the documentation in the forum when you can read the details yourself). This would allow you to create a path separated from the original path, which follows the bends of the original path correctly.
Thanks a lot for your reply.
I actaully had posted my previous query before I saw your post so did not get the fact that bBox is a derived property for PATH.
I will see rodCreatePath() in the ROD document.
Again thans a lot.
I used rodCreatpath().
I drew the shielded path by doing
......... ) ;end rodCreatePath
but SignalPath~>points is giving "nil" though SignalPath is showing ROD object ID
Could you please tell why it is showing like this.
What canbe done to access the attributes of the rodObject ?
Because the rod object is a container object which contains some additional information and handles on top of the database id. So you'd use:
to get the point list.
rodID is SignalPath.
But how can I get dbId ?
My rodCreate() is as below.
SignalPath=rodCreatePath( ?layer layer ?pts pts ?width layerWidth ?justification "center" ?cvId cv ?offsetSubPath list( list( ?layer layer ?justification "left" ?sep layerSpace ?width layerWidth ) ;end subpath1 list( ?layer layer ?justification "right" ?sep layerSpace ?width layerWidth ) ;end subpath2 ) ;end list of lists ) ;end rodCreatePath
SignalPath~>dbId (as I said earlier)
SignalPath~>? shows the list of attributes of the rod object, and SignalPath~>?? shows the attributes and their values. You can use this for most objects in Virtuoso. So you can do SignalPath~>dbId~>?? for example.
I am able to access the point list of a subpath.
However is there any function to modify the nth element of a list like an array.
one can achieve by using setcar() but is there any simple way.
You can use setcar(nthcdr(N lst) newValue) to do this. Doesn't really need a specific function to do something so easy.
In general however, using nth-type operators on lists is a bad way to do things. Lists are sequential data structures, and are not designed for random access operators (i.e. to be treated like arrays). Each time you ask for the Nth entry in a list, it has to start at the beginning and hop along N times until it reaches the entry.
So, if you're doing a number of operations where you need access (read or write) to a numbered entry in the list, you may be better off doing:
In other words, converting the list into an array for the duration of your random access operations. For small lists, it's fine to use nth/nthcdr, but as soon as lists reach any kind of length, doing a repeated access by position can end up being very slow. The classic mistake I see people making is where they have a list and then want to (say) add up the values. They do:
sum=0for(pos 0 length(lst)-1 sum=sum+nth(pos lst))
That's OK if the list only has 5 entries, but if it had 1 million entries (say) it would take roughly half a billion list cell traversals (N(N+1)/2) whereas the correct way of doing it would be:
sum=0foreach(val lst sum=sum+val)
That's only a million list cell traversals - so half a million times fewer!
Thanks a lot for nicely explaining the concept of "list" and its access.
Now I am able to do what I was intending to achieve.
As you said, ROD is a container having objects inside it.
Is it possible to do something, so that one can access/edit each object in the layout.
For example, I created a bus of 5 subpaths in the layout. Suppose in the layout I want to edit each path. How it can be done.